(function() { /*! For license information please see qualified-6449e18b.js.LICENSE.txt */ var __webpack_modules__={5023:function(e,t,i){"use strict";function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}i.d(t,{_:()=>n})},67:function(e,t,i){"use strict";i.d(t,{_:()=>r});var n=0;function r(e){return"__private_"+n+++"_"+e}},4464:function(e,t,i){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;tn})},7888:function(e,t,i){"use strict";function n(e,t){if(null==e)return{};var i,n,r={},s=Object.keys(e);for(n=0;n=0||(r[i]=e[i]);return r}i.d(t,{_:()=>n})},7423:function(e,t,i){"use strict";function n(e,t){return t||(t=e.slice(0)),e.raw=t,e}i.d(t,{_:()=>n})},1530:function(e,t,i){"use strict";i.d(t,{A:()=>a});var n=i(1354),r=i.n(n),s=i(6314),o=i.n(s)()(r());o.push([e.id,"#q-messenger-frame-skip-link{all:initial !important;border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;margin:-1px !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}#q-messenger-frame-skip-link:focus{all:initial !important;position:fixed !important;top:10px !important;left:10px !important;z-index:2147483647 !important;background:#fafafa !important;color:#122124 !important;padding:1rem !important;cursor:pointer !important;border-radius:4px !important;outline:2px solid -webkit-focus-ring-color !important;outline-offset:2px !important}#q-messenger-frame{position:fixed !important;z-index:2147483642 !important;display:block !important;visibility:visible !important;content-visibility:visible !important;opacity:1 !important;top:auto !important;left:auto !important;bottom:calc(0px + var(--qualified-offer-footer-height, 0px)) !important;right:0 !important;height:0 !important;width:0 !important;overflow:hidden !important;background-color:rgba(0,0,0,0) !important;border:0 !important;padding:0 !important}#q-messenger-frame.qlfd-maximized,#q-messenger-frame.maximized{max-height:calc(100dvh - 150px);min-height:480px;width:538px !important}#q-messenger-frame.qlfd-maximized.qlfd-is-mobile,#q-messenger-frame.maximized.qlfd-is-mobile{height:100% !important;width:100% !important;min-height:100% !important;max-height:100% !important}#q-messenger-frame.qlfd-full-height{height:100% !important;width:320px !important;min-height:100% !important;max-height:100% !important}#q-messenger-frame.qlfd-disable-pointer-events{pointer-events:none !important}#q-messenger-frame.qlfd-embedded{position:relative !important;height:100% !important;width:100% !important;min-height:100% !important;max-height:100% !important;z-index:0 !important;pointer-events:all !important}#q-messenger-frame.qlfd-full-screen{position:fixed !important;height:100dvh !important;width:100% !important;max-height:100dvh;z-index:2147483647 !important}#q-messenger-frame.qlfd-not-full-screen{transition:background-color 300ms,height 0s 300ms,width 0s 300ms !important}*:has(#q-messenger-frame.qlfd-full-screen.qlfd-embedded){z-index:unset !important}","",{version:3,sources:["webpack://./app/javascript/widget/widget.string.scss"],names:[],mappings:"AAEA,6BACE,sBAAA,CAGA,mBAAA,CACA,wCAAA,CACA,+BAAA,CACA,qBAAA,CACA,0BAAA,CACA,sBAAA,CACA,oBAAA,CACA,4BAAA,CACA,oBAAA,CACA,6BAAA,CAEA,mCACE,sBAAA,CACA,yBAAA,CACA,mBAAA,CACA,oBAAA,CAEA,6BAAA,CACA,6BAAA,CACA,wBAAA,CACA,uBAAA,CACA,yBAAA,CACA,4BAAA,CACA,qDAAA,CACA,6BAAA,CAIJ,mBACE,yBAAA,CAEA,6BAAA,CACA,wBAAA,CACA,6BAAA,CACA,qCAAA,CACA,oBAAA,CACA,mBAAA,CACA,oBAAA,CACA,uEAAA,CACA,kBAAA,CACA,mBAAA,CACA,kBAAA,CACA,0BAAA,CACA,yCAAA,CACA,mBAAA,CACA,oBAAA,CAEA,+DAME,+BAAA,CACA,gBAAA,CACA,sBAAA,CAGA,6FACE,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,0BAAA,CAIJ,oCACE,sBAAA,CACA,sBAAA,CACA,0BAAA,CACA,0BAAA,CAGF,+CACE,8BAAA,CAGF,iCACE,4BAAA,CACA,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,0BAAA,CACA,oBAAA,CACA,6BAAA,CAGF,oCACE,yBAAA,CACA,wBAAA,CACA,qBAAA,CACA,iBAAA,CACA,6BAAA,CAGF,wCACE,2EACE,CAMN,yDACE,wBAAA",sourcesContent:["// DOM visibility API\n\n#q-messenger-frame-skip-link {\n all: initial !important;\n\n // visually hidden CSS: https://kittygiraudel.com/2020/12/03/a11y-advent-hiding-content/\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n clip-path: inset(50%) !important;\n height: 1px !important;\n overflow: hidden !important;\n margin: -1px !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n white-space: nowrap !important;\n\n &:focus {\n all: initial !important;\n position: fixed !important;\n top: 10px !important;\n left: 10px !important;\n // TODO(eslint): Explain why this is needed. This comment was added as part of the enforce-comment eslint rule\n z-index: 2147483647 !important;\n background: #fafafa !important;\n color: #122124 !important;\n padding: 1rem !important;\n cursor: pointer !important;\n border-radius: 4px !important;\n outline: 2px solid -webkit-focus-ring-color !important;\n outline-offset: 2px !important;\n }\n}\n\n#q-messenger-frame {\n position: fixed !important;\n // 2^31-2, reserving max for peeper cursor\n z-index: 2147483642 !important;\n display: block !important;\n visibility: visible !important;\n content-visibility: visible !important;\n opacity: 1 !important;\n top: auto !important;\n left: auto !important;\n bottom: calc(0px + var(--qualified-offer-footer-height, 0px)) !important;\n right: 0 !important;\n height: 0 !important;\n width: 0 !important;\n overflow: hidden !important;\n background-color: transparent !important;\n border: 0 !important;\n padding: 0 !important;\n\n &.qlfd-maximized,\n // TODO: .maximized is deprecated, remove once backwards compatibility is no longer needed\n &.maximized {\n // If these values are changed, please update the values that are used in\n // app/javascript/components/styles/messenger.js\n // app/javascript/widget/iframe_manager.ts -> DEFAULT_IFRAME_SIZES_CLS_ENHANCEMENTS\n max-height: calc(100dvh - 150px);\n min-height: 480px;\n width: 538px !important;\n\n // Not using media queries so that live view displays properly\n &.qlfd-is-mobile {\n height: 100% !important;\n width: 100% !important;\n min-height: 100% !important;\n max-height: 100% !important;\n }\n }\n\n &.qlfd-full-height {\n height: 100% !important;\n width: 320px !important;\n min-height: 100% !important;\n max-height: 100% !important;\n }\n\n &.qlfd-disable-pointer-events {\n pointer-events: none !important;\n }\n\n &.qlfd-embedded {\n position: relative !important;\n height: 100% !important;\n width: 100% !important;\n min-height: 100% !important;\n max-height: 100% !important;\n z-index: 0 !important;\n pointer-events: all !important;\n }\n\n &.qlfd-full-screen {\n position: fixed !important;\n height: 100dvh !important;\n width: 100% !important;\n max-height: 100dvh;\n z-index: 2147483647 !important;\n }\n\n &.qlfd-not-full-screen {\n transition:\n background-color 300ms,\n height 0s 300ms,\n width 0s 300ms !important;\n }\n}\n\n*:has(#q-messenger-frame.qlfd-full-screen.qlfd-embedded) {\n z-index: unset !important;\n}\n"],sourceRoot:""}]);let a=o.toString()},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,n,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),i&&(u[2]&&(u[1]="@media ".concat(u[2]," {").concat(u[1],"}")),u[2]=i),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},1354:function(e){"use strict";e.exports=function(e){var t=e[1],i=e[3];if(!i)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(i))));return[t].concat(["/*# ".concat("sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n)," */")]).join("\n")}return[t].join("\n")}},7971:function(e,t){"use strict";var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(i.push(o.value),!t||i.length!==t);n=!0);}catch(e){r=!0,s=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw s}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){for(var t=void 0,n=d(e),r=[],s=[];t=n.shift();)if(o(t)||c(t)||r.length&&0===n.length&&!l(t)){s.push(t);break}else r.push(t);s=s.concat(n),a(r[0])&&r.shift();var h=i(u(r,s),2);return r=h[0],s=h[1],[r.join(" ")||null,s.join(" ")||null]};var n=["de","da","la","du","del","dei","vda.","dello","della","degli","delle","van","von","der","den","heer","ten","ter","vande","vanden","vander","voor","ver","aan","mc"],r=/,? +(i{1,3}|iv|vi{0,3}|s(enio)?r|j(unio)?r|phd|apr|rph|pe|md|ma|dmd|cme)$/i,s=/^(mrs?|m[ia]ster|miss|ms|d(octo)?r|prof|rev|fr|judge|honorable|hon|lord|lady)\.?$/i,o=function(e){return -1!=n.indexOf(e.toLowerCase())},a=function(e){return e&&e.match(s)},l=function(e){return e.match(/^\w\.?$/)},c=function(e){return e.match(/\w{1}'\w+/)},u=function(e,t){if(e.length>1&&!l(e[e.length-1])&&t.join(" ").match(/^(van der|(vda\. )?de la \w+$)/i))for(;t.unshift(e.pop()),!(e.length<=2););return[e,t]},d=function(e){return -1!=(e=e.trim().replace(/\s+/g," ").replace(r,"")).indexOf(",")?e.split(/\s*,\s*/,2).map(function(e){return e||null}).reverse():e.split(/\s+/)}},7668:function(e,t,i){"use strict";i.d(t,{A:()=>y});var n=/iPhone/i,r=/iPod/i,s=/iPad/i,o=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,l=/Android/i,c=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,u=/Silk/i,d=/Windows Phone/i,h=/\bWindows(?:.+)ARM\b/i,p=/BlackBerry/i,m=/BB10/i,f=/Opera Mini/i,g=/\b(CriOS|Chrome)(?:.+)Mobile/i,v=/Mobile(?:.+)Firefox\b/i,b=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};function y(e){var t,i={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?i.userAgent=e:e&&e.userAgent&&(i={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):i={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var y=i.userAgent,_=y.split("[FBAN");void 0!==_[1]&&(y=_[0]),void 0!==(_=y.split("Twitter"))[1]&&(y=_[0]);var w=(t=y,function(e){return e.test(t)}),E={apple:{phone:w(n)&&!w(d),ipod:w(r),tablet:!w(n)&&(w(s)||b(i))&&!w(d),universal:w(o),device:(w(n)||w(r)||w(s)||w(o)||b(i))&&!w(d)},amazon:{phone:w(c),tablet:!w(c)&&w(u),device:w(c)||w(u)},android:{phone:!w(d)&&w(c)||!w(d)&&w(a),tablet:!w(d)&&!w(c)&&!w(a)&&(w(u)||w(l)),device:!w(d)&&(w(c)||w(u)||w(a)||w(l))||w(/\bokhttp\b/i)},windows:{phone:w(d),tablet:w(h),device:w(d)||w(h)},other:{blackberry:w(p),blackberry10:w(m),opera:w(f),firefox:w(v),chrome:w(g),device:w(p)||w(m)||w(f)||w(v)||w(g)},any:!1,phone:!1,tablet:!1};return E.any=E.apple.device||E.android.device||E.windows.device||E.other.device,E.phone=E.apple.phone||E.android.phone||E.windows.phone,E.tablet=E.apple.tablet||E.android.tablet||E.windows.tablet,E}},5580:function(e,t,i){e.exports=i(6110)(i(9325),"DataView")},1549:function(e,t,i){var n=i(2032),r=i(3862),s=i(6721),o=i(2749),a=i(5749);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1}},9905:function(e){e.exports=function(e,t,i){for(var n=-1,r=null==e?0:e.length;++n=200&&(d=l,h=!1,t=new n(t));e:for(;++u0&&s(u)?i>1?e(u,i-1,s,o,a):n(a,u):o||(a[a.length]=u)}return a}},6649:function(e,t,i){e.exports=i(3221)()},641:function(e,t,i){var n=i(6649),r=i(5950);e.exports=function(e,t){return e&&n(e,t,r)}},7422:function(e,t,i){var n=i(1769),r=i(7797);e.exports=function(e,t){t=n(t,e);for(var i=0,s=t.length;null!=e&&i=200){var f=t?null:a(e);if(f)return l(f);h=!1,u=o,m=new n}else m=t?[]:p;e:for(;++cu))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var m=-1,f=!0,g=2&i?new n:void 0;for(l.set(e,t),l.set(t,e);++m-1&&e%1==0&&e-1}},1175:function(e,t,i){var n=i(6025);e.exports=function(e,t){var i=this.__data__,r=n(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this}},3040:function(e,t,i){var n=i(1549),r=i(79),s=i(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||r),string:new n}}},7670:function(e,t,i){var n=i(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=!!t,t}},289:function(e,t,i){var n=i(2651);e.exports=function(e){return n(this,e).get(e)}},4509:function(e,t,i){var n=i(2651);e.exports=function(e){return n(this,e).has(e)}},2949:function(e,t,i){var n=i(2651);e.exports=function(e,t){var i=n(this,e),r=i.size;return i.set(e,t),this.size+=+(i.size!=r),this}},317:function(e){e.exports=function(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}},7197:function(e){e.exports=function(e,t){return function(i){return null!=i&&i[e]===t&&(void 0!==t||e in Object(i))}}},2224:function(e,t,i){var n=i(104);e.exports=function(e){var t=n(e,function(e){return 500===i.size&&i.clear(),e}),i=t.cache;return t}},1042:function(e,t,i){e.exports=i(6110)(Object,"create")},3650:function(e,t,i){e.exports=i(4335)(Object.keys,Object)},181:function(e){e.exports=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}},6009:function(e,t,i){e=i.nmd(e);var n=i(4840),r=t&&!t.nodeType&&t,s=r&&e&&!e.nodeType&&e,o=s&&s.exports===r&&n.process,a=function(){try{var e=s&&s.require&&s.require("util").types;if(e)return e;return o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a},9350:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:function(e){e.exports=function(e,t){return function(i){return e(t(i))}}},6757:function(e,t,i){var n=i(1033),r=Math.max;e.exports=function(e,t,i){return t=r(void 0===t?e.length-1:t,0),function(){for(var s=arguments,o=-1,a=r(s.length-t,0),l=Array(a);++o0){if(++i>=800)return arguments[0]}else i=0;return e.apply(void 0,arguments)}}},1420:function(e,t,i){var n=i(79);e.exports=function(){this.__data__=new n,this.size=0}},938:function(e){e.exports=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}},3605:function(e){e.exports=function(e){return this.__data__.get(e)}},9817:function(e){e.exports=function(e){return this.__data__.has(e)}},945:function(e,t,i){var n=i(79),r=i(8223),s=i(3661);e.exports=function(e,t){var i=this.__data__;if(i instanceof n){var o=i.__data__;if(!r||o.length<199)return o.push([e,t]),this.size=++i.size,this;i=this.__data__=new s(o)}return i.set(e,t),this.size=i.size,this}},6959:function(e){e.exports=function(e,t,i){for(var n=i-1,r=e.length;++n0&&(i=t.apply(this,arguments)),e<=1&&(t=void 0),i}}},8055:function(e,t,i){var n=i(9999);e.exports=function(e){return n(e,5)}},3673:function(e){e.exports=function(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t=t||i<0||g&&n>=u}function _(){var e,i,n,s=r();if(y(s))return w(s);h=setTimeout(_,(e=s-p,i=s-m,n=t-e,g?a(n,u-i):n))}function w(e){return(h=void 0,v&&l)?b(e):(l=c=void 0,d)}function E(){var e,i=r(),n=y(i);if(l=arguments,c=this,p=i,n){if(void 0===h)return m=e=p,h=setTimeout(_,t),f?b(e):d;if(g)return clearTimeout(h),h=setTimeout(_,t),b(p)}return void 0===h&&(h=setTimeout(_,t)),d}return t=s(t)||0,n(i)&&(f=!!i.leading,u=(g="maxWait"in i)?o(s(i.maxWait)||0,t):u,v="trailing"in i?!!i.trailing:v),E.cancel=function(){void 0!==h&&clearTimeout(h),m=0,l=p=c=h=void 0},E.flush=function(){return void 0===h?d:w(r())},E}},6245:function(e,t,i){var n=i(3915),r=i(3120),s=i(9302),o=i(3693);e.exports=s(function(e,t){return o(e)?n(e,r(t,1,o,!0)):[]})},5288:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},680:function(e,t,i){var n=i(3222),r=/[\\^$.*+?()[\]{}|]/g,s=RegExp(r.source);e.exports=function(e){return(e=n(e))&&s.test(e)?e.replace(r,"\\$&"):e}},8156:function(e,t,i){var n=i(7422);e.exports=function(e,t,i){var r=null==e?void 0:n(e,t);return void 0===r?i:r}},631:function(e,t,i){var n=i(8077),r=i(9326);e.exports=function(e,t){return null!=e&&r(e,t,n)}},3488:function(e){e.exports=function(e){return e}},866:function(e,t,i){var n=i(7334),r=i(6958),s=i(3488),o=Object.prototype.toString;e.exports=r(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=o.call(t)),e[t]=i},n(s))},2428:function(e,t,i){var n=i(7534),r=i(346),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable;e.exports=n(function(){return arguments}())?n:function(e){return r(e)&&o.call(e,"callee")&&!a.call(e,"callee")}},6449:function(e){e.exports=Array.isArray},4894:function(e,t,i){var n=i(1882),r=i(294);e.exports=function(e){return null!=e&&r(e.length)&&!n(e)}},3693:function(e,t,i){var n=i(4894),r=i(346);e.exports=function(e){return r(e)&&n(e)}},3656:function(e,t,i){e=i.nmd(e);var n=i(9325),r=i(9935),s=t&&!t.nodeType&&t,o=s&&e&&!e.nodeType&&e,a=o&&o.exports===s?n.Buffer:void 0,l=a?a.isBuffer:void 0;e.exports=l||r},2404:function(e,t,i){var n=i(270);e.exports=function(e,t){return n(e,t)}},1882:function(e,t,i){var n=i(2552),r=i(3805);e.exports=function(e){if(!r(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},7730:function(e,t,i){var n=i(9172),r=i(7301),s=i(6009),o=s&&s.isMap;e.exports=o?r(o):n},9843:function(e){e.exports=function(e){return null==e}},3805:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8440:function(e,t,i){var n=i(6038),r=i(7301),s=i(6009),o=s&&s.isSet;e.exports=o?r(o):n},4394:function(e,t,i){var n=i(2552),r=i(346);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}},7167:function(e,t,i){var n=i(4901),r=i(7301),s=i(6009),o=s&&s.isTypedArray;e.exports=o?r(o):n},5950:function(e,t,i){var n=i(695),r=i(8984),s=i(4894);e.exports=function(e){return s(e)?n(e):r(e)}},7241:function(e,t,i){var n=i(695),r=i(2903),s=i(4894);e.exports=function(e){return s(e)?n(e,!0):r(e)}},3916:function(e,t,i){var n=i(3360),r=i(641),s=i(5389);e.exports=function(e,t){var i={};return t=s(t,3),r(e,function(e,r,s){n(i,r,t(e,r,s))}),i}},104:function(e,t,i){var n=i(3661);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],s=i.cache;if(s.has(r))return s.get(r);var o=e.apply(this,n);return i.cache=s.set(r,o)||s,o};return i.cache=new(r.Cache||n),i}r.Cache=n,e.exports=r},6048:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}},3950:function(e){e.exports=function(){}},124:function(e,t,i){var n=i(9325);e.exports=function(){return n.Date.now()}},2194:function(e,t,i){var n=i(5389),r=i(6048),s=i(1086);e.exports=function(e,t){return s(e,r(n(t)))}},8059:function(e,t,i){var n=i(2177);e.exports=function(e){return n(2,e)}},1086:function(e,t,i){var n=i(4932),r=i(5389),s=i(7420),o=i(3349);e.exports=function(e,t){if(null==e)return{};var i=n(o(e),function(e){return[e]});return t=r(t),s(e,i,function(e,i){return t(e,i[0])})}},583:function(e,t,i){var n=i(7237),r=i(7255),s=i(8586),o=i(7797);e.exports=function(e){return s(e)?n(o(e)):r(e)}},3345:function(e){e.exports=function(){return[]}},9935:function(e){e.exports=function(){return!1}},7350:function(e,t,i){var n=i(8221),r=i(3805);e.exports=function(e,t,i){var s=!0,o=!0;if("function"!=typeof e)throw TypeError("Expected a function");return r(i)&&(s="leading"in i?!!i.leading:s,o="trailing"in i?!!i.trailing:o),n(e,t,{leading:s,maxWait:t,trailing:o})}},7400:function(e,t,i){var n=i(9374),r=1/0;e.exports=function(e){return e?(e=n(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},1489:function(e,t,i){var n=i(7400);e.exports=function(e){var t=n(e),i=t%1;return t==t?i?t-i:t:0}},9374:function(e,t,i){var n=i(4128),r=i(3805),s=i(4394),o=0/0,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return o;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var i=l.test(e);return i||c.test(e)?u(e.slice(2),i?2:8):a.test(e)?o:+e}},3222:function(e,t,i){var n=i(7556);e.exports=function(e){return null==e?"":n(e)}},3375:function(e,t,i){var n=i(5765);e.exports=function(e){return e&&e.length?n(e):[]}},5228:function(e){"use strict";var t=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var r={};if("abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},r)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,r){for(var s,o,a=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;lO.length&&O.push(e)}function P(e,t,i){return null==e?0:function e(t,i,n,r){var a=typeof t;("undefined"===a||"boolean"===a)&&(t=null);var l=!1;if(null===t)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case s:case o:l=!0}}if(l)return n(r,t,""===i?"."+D(t,0):i),1;if(l=0,i=""===i?".":i+":",Array.isArray(t))for(var c=0;c>>((3&t)<<3)&255;return n}}},3414:function(e,t,i){var n,r,s=i(5814),o=i(471),a=0,l=0;e.exports=function(e,t,i){var c=t&&i||0,u=t||[],d=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:r;if(null==d||null==h){var p=s();null==d&&(d=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=r=(p[6]<<8|p[7])&16383)}var m=void 0!==e.msecs?e.msecs:new Date().getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,g=m-a+(f-l)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||m>a)&&void 0===e.nsecs&&(f=0),f>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");a=m,l=f,r=h;var v=((0xfffffff&(m+=122192928e5))*1e4+f)%0x100000000;u[c++]=v>>>24&255,u[c++]=v>>>16&255,u[c++]=v>>>8&255,u[c++]=255&v;var b=m/0x100000000*1e4&0xfffffff;u[c++]=b>>>8&255,u[c++]=255&b,u[c++]=b>>>24&15|16,u[c++]=b>>>16&255,u[c++]=h>>>8|128,u[c++]=255&h;for(var y=0;y<6;++y)u[c+y]=d[y];return t||o(u)}},2550:function(e,t,i){var n=i(5814),r=i(471);e.exports=function(e,t,i){var s=t&&i||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;++a)t[s+a]=o[a];return t||r(o)}},6439:function(e,t,i){"use strict";function n(e){throw Error("asserted unreachable but this was reached. value was: "+e)}i.d(t,{d:()=>n})},5868:function(e,t,i){"use strict";i.d(t,{DR:()=>ev,Rr:()=>ey,X6:()=>eb,wR:()=>eg,Xq:()=>e_});var n,r=i(7423),s=function(){return(s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i120){for(var m=Math.floor(l/80),f=l%80,g=[],v=0;v0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack)?(Object.defineProperty(f(w),"stack",{value:c.stack,writable:!0,configurable:!0}),m(w)):(Error.captureStackTrace?Error.captureStackTrace(f(w),r):Object.defineProperty(f(w),"stack",{value:Error().stack,writable:!0,configurable:!0}),w)}return i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var i=0,n=e.nodes;i",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){if(!e)throw Error(t)}var M=function(){var e;function t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||F(0,"Body must be a string. Received: ".concat(function e(t,i){switch(O(t)){case"string":return JSON.stringify(t);case"function":return t.name?"[function ".concat(t.name,"]"):"[function]";case"object":if(null===t)return"null";return function(t,i){if(-1!==i.indexOf(t))return"[Circular]";var n,r,s,o,a,l=[].concat(i,[t]),c="function"==typeof(r=(n=t)[String(x)])?r:"function"==typeof n.inspect?n.inspect:void 0;if(void 0!==c){var u=c.call(t);if(u!==t)return"string"==typeof u?u:e(u,l)}else if(Array.isArray(t)){var d=t,h=l;if(0===d.length)return"[]";if(h.length>2)return"[Array]";for(var p=Math.min(10,d.length),m=d.length-p,f=[],g=0;g1&&f.push("... ".concat(m," more items")),"["+f.join(", ")+"]"}return s=t,o=l,0===(a=Object.keys(s)).length?"{}":o.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var i=e.constructor.name;if("string"==typeof i&&""!==i)return i}return t}(s)+"]":"{ "+a.map(function(t){var i=e(s[t],o);return t+": "+i}).join(", ")+" }"}(t,i);default:return String(t)}}(e,[]),".")),this.body=e,this.name=t,this.locationOffset=i,this.locationOffset.line>0||F(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||F(0,"column in locationOffset is 1-indexed and must be positive.")}return e=[{key:a,get:function(){return"Source"}}],function(e,t){for(var i=0;i31||9===s));return new k(I.COMMENT,t,a,i,n,r,o.slice(t+1,a))}(i,s,l,c,t);case 36:return new k(I.DOLLAR,s,s+1,l,c,t);case 38:return new k(I.AMP,s,s+1,l,c,t);case 40:return new k(I.PAREN_L,s,s+1,l,c,t);case 41:return new k(I.PAREN_R,s,s+1,l,c,t);case 46:if(46===n.charCodeAt(s+1)&&46===n.charCodeAt(s+2))return new k(I.SPREAD,s,s+3,l,c,t);break;case 58:return new k(I.COLON,s,s+1,l,c,t);case 61:return new k(I.EQUALS,s,s+1,l,c,t);case 64:return new k(I.AT,s,s+1,l,c,t);case 91:return new k(I.BRACKET_L,s,s+1,l,c,t);case 93:return new k(I.BRACKET_R,s,s+1,l,c,t);case 123:return new k(I.BRACE_L,s,s+1,l,c,t);case 124:return new k(I.PIPE,s,s+1,l,c,t);case 125:return new k(I.BRACE_R,s,s+1,l,c,t);case 34:if(34===n.charCodeAt(s+1)&&34===n.charCodeAt(s+2))return function(e,t,i,n,r,s){for(var o=e.body,a=t+3,l=a,c=0,u="";ar&&D(t[s-1]);)--s;return t.slice(r,s).join("\n")}(u));if(c<32&&9!==c&&10!==c&&13!==c)throw A(e,a,"Invalid character within String: ".concat(R(c),"."));10===c?(++a,++s.line,s.lineStart=a):13===c?(10===o.charCodeAt(a+1)?a+=2:++a,++s.line,s.lineStart=a):92===c&&34===o.charCodeAt(a+1)&&34===o.charCodeAt(a+2)&&34===o.charCodeAt(a+3)?(u+=o.slice(l,a)+'"""',a+=4,l=a):++a}throw A(e,a,"Unterminated string.")}(i,s,l,c,t,e);return function(e,t,i,n,r){for(var s=e.body,o=t+1,a=o,l=0,c="";o=48&&l<=57)throw A(e,c,"Invalid number, unexpected digit after 0: ".concat(R(l),"."))}else c=N(e,c,l),l=a.charCodeAt(c);if(46===l&&(u=!0,l=a.charCodeAt(++c),c=N(e,c,l),l=a.charCodeAt(c)),(69===l||101===l)&&(u=!0,(43===(l=a.charCodeAt(++c))||45===l)&&(l=a.charCodeAt(++c)),c=N(e,c,l),l=a.charCodeAt(c)),46===l||95===(o=l)||o>=65&&o<=90||o>=97&&o<=122)throw A(e,c,"Invalid number, expected digit but got: ".concat(R(l),"."));return new k(u?I.FLOAT:I.INT,t,c,n,r,s,a.slice(t,c))}(i,s,a,l,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:for(var u=i,d=s,h=l,p=c,m=t,f=u.body,g=f.length,v=d+1,b=0;v!==g&&!isNaN(b=f.charCodeAt(v))&&(95===b||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122);)++v;return new k(I.NAME,d,v,h,p,m,f.slice(d,v))}throw A(i,s,(o=a)<32&&9!==o&&10!==o&&13!==o?"Cannot contain the invalid character ".concat(R(o),"."):39===o?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(R(o),"."))}var y=e.line,_=1+s-e.lineStart;return new k(I.EOF,r,r,y,_,t)}(this,t);while(t.kind===I.COMMENT);return t},e}();function R(e){return isNaN(e)?I.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function N(e,t,i){var n=e.body,r=t,s=i;if(s>=48&&s<=57){do s=n.charCodeAt(++r);while(s>=48&&s<=57);return r}throw A(e,r,"Invalid number, expected digit but got: ".concat(R(s),"."))}function B(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}var U=function(){function e(e,t){var i=e instanceof M?e:new M(e);this._lexer=new L(i),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(I.NAME);return{kind:S.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:S.DOCUMENT,definitions:this.many(I.SOF,this.parseDefinition,I.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(I.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else if(this.peek(I.BRACE_L))return this.parseOperationDefinition();else if(this.peekDescription())return this.parseTypeSystemDefinition();throw this.unexpected()},t.parseOperationDefinition=function(){var e,t=this._lexer.token;if(this.peek(I.BRACE_L))return{kind:S.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(t)};var i=this.parseOperationType();return this.peek(I.NAME)&&(e=this.parseName()),{kind:S.OPERATION_DEFINITION,operation:i,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseOperationType=function(){var e=this.expectToken(I.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(I.PAREN_L,this.parseVariableDefinition,I.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:S.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(I.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(I.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(I.DOLLAR),{kind:S.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:S.SELECTION_SET,selections:this.many(I.BRACE_L,this.parseSelection,I.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(I.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,i=this._lexer.token,n=this.parseName();return this.expectOptionalToken(I.COLON)?(e=n,t=this.parseName()):t=n,{kind:S.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(I.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(i)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(I.PAREN_L,t,I.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(I.COLON),{kind:S.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:S.ARGUMENT,name:this.parseName(),value:(this.expectToken(I.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(I.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(I.NAME)?{kind:S.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:S.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return(this.expectKeyword("fragment"),(null==(e=this._options)?void 0:e.experimentalFragmentVariables)===!0)?{kind:S.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:S.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case I.BRACKET_L:return this.parseList(e);case I.BRACE_L:return this.parseObject(e);case I.INT:return this._lexer.advance(),{kind:S.INT,value:t.value,loc:this.loc(t)};case I.FLOAT:return this._lexer.advance(),{kind:S.FLOAT,value:t.value,loc:this.loc(t)};case I.STRING:case I.BLOCK_STRING:return this.parseStringLiteral();case I.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:S.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:S.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:S.NULL,loc:this.loc(t)};default:return{kind:S.ENUM,value:t.value,loc:this.loc(t)}}case I.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:S.STRING,value:e.value,block:e.kind===I.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,i=this._lexer.token;return{kind:S.LIST,values:this.any(I.BRACKET_L,function(){return t.parseValueLiteral(e)},I.BRACKET_R),loc:this.loc(i)}},t.parseObject=function(e){var t=this,i=this._lexer.token;return{kind:S.OBJECT,fields:this.any(I.BRACE_L,function(){return t.parseObjectField(e)},I.BRACE_R),loc:this.loc(i)}},t.parseObjectField=function(e){var t=this._lexer.token,i=this.parseName();return this.expectToken(I.COLON),{kind:S.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(I.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(I.AT),{kind:S.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return(this.expectOptionalToken(I.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(I.BRACKET_R),e={kind:S.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(I.BANG))?{kind:S.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:S.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===I.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(I.STRING)||this.peek(I.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var i=this.parseDirectives(!0),n=this.many(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);return{kind:S.SCHEMA_DEFINITION,description:t,directives:i,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(I.COLON);var i=this.parseNamedType();return{kind:S.OPERATION_TYPE_DEFINITION,operation:t,type:i,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var i=this.parseName(),n=this.parseDirectives(!0);return{kind:S.SCALAR_TYPE_DEFINITION,description:t,name:i,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var i=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),s=this.parseFieldsDefinition();return{kind:S.OBJECT_TYPE_DEFINITION,description:t,name:i,interfaces:n,directives:r,fields:s,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if((null==(e=this._options)?void 0:e.allowLegacySDLImplementsInterfaces)===!0){var t=[];this.expectOptionalToken(I.AMP);do t.push(this.parseNamedType());while(this.expectOptionalToken(I.AMP)||this.peek(I.NAME));return t}return this.delimitedMany(I.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return(null==(e=this._options)?void 0:e.allowLegacySDLEmptyFields)===!0&&this.peek(I.BRACE_L)&&this._lexer.lookahead().kind===I.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(I.BRACE_L,this.parseFieldDefinition,I.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),i=this.parseName(),n=this.parseArgumentDefs();this.expectToken(I.COLON);var r=this.parseTypeReference(),s=this.parseDirectives(!0);return{kind:S.FIELD_DEFINITION,description:t,name:i,arguments:n,type:r,directives:s,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(I.PAREN_L,this.parseInputValueDef,I.PAREN_R)},t.parseInputValueDef=function(){var e,t=this._lexer.token,i=this.parseDescription(),n=this.parseName();this.expectToken(I.COLON);var r=this.parseTypeReference();this.expectOptionalToken(I.EQUALS)&&(e=this.parseValueLiteral(!0));var s=this.parseDirectives(!0);return{kind:S.INPUT_VALUE_DEFINITION,description:i,name:n,type:r,defaultValue:e,directives:s,loc:this.loc(t)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var i=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),s=this.parseFieldsDefinition();return{kind:S.INTERFACE_TYPE_DEFINITION,description:t,name:i,interfaces:n,directives:r,fields:s,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var i=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();return{kind:S.UNION_TYPE_DEFINITION,description:t,name:i,directives:n,types:r,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(I.EQUALS)?this.delimitedMany(I.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var i=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();return{kind:S.ENUM_TYPE_DEFINITION,description:t,name:i,directives:n,values:r,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(I.BRACE_L,this.parseEnumValueDefinition,I.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),i=this.parseName(),n=this.parseDirectives(!0);return{kind:S.ENUM_VALUE_DEFINITION,description:t,name:i,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var i=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();return{kind:S.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:i,directives:n,fields:r,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(I.BRACE_L,this.parseInputValueDef,I.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===I.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),i=this.optionalMany(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);if(0===t.length&&0===i.length)throw this.unexpected();return{kind:S.SCHEMA_EXTENSION,directives:t,operationTypes:i,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),i=this.parseDirectives(!0);if(0===i.length)throw this.unexpected();return{kind:S.SCALAR_TYPE_EXTENSION,name:t,directives:i,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===i.length&&0===n.length&&0===r.length)throw this.unexpected();return{kind:S.OBJECT_TYPE_EXTENSION,name:t,interfaces:i,directives:n,fields:r,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===i.length&&0===n.length&&0===r.length)throw this.unexpected();return{kind:S.INTERFACE_TYPE_EXTENSION,name:t,interfaces:i,directives:n,fields:r,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),i=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===i.length&&0===n.length)throw this.unexpected();return{kind:S.UNION_TYPE_EXTENSION,name:t,directives:i,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),i=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===i.length&&0===n.length)throw this.unexpected();return{kind:S.ENUM_TYPE_EXTENSION,name:t,directives:i,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),i=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===i.length&&0===n.length)throw this.unexpected();return{kind:S.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:i,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(I.AT);var i=this.parseName(),n=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var s=this.parseDirectiveLocations();return{kind:S.DIRECTIVE_DEFINITION,description:t,name:i,arguments:n,repeatable:r,locations:s,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(I.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==P[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if((null==(t=this._options)?void 0:t.noLocation)!==!0)return new T(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw A(this._lexer.source,t.start,"Expected ".concat(z(e),", found ").concat(j(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind===I.NAME&&t.value===e)this._lexer.advance();else throw A(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(j(t),"."))},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===I.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return A(this._lexer.source,t.start,"Unexpected ".concat(j(t),"."))},t.any=function(e,t,i){this.expectToken(e);for(var n=[];!this.expectOptionalToken(i);)n.push(t.call(this));return n},t.optionalMany=function(e,t,i){if(this.expectOptionalToken(e)){var n=[];do n.push(t.call(this));while(!this.expectOptionalToken(i));return n}return[]},t.many=function(e,t,i){this.expectToken(e);var n=[];do n.push(t.call(this));while(!this.expectOptionalToken(i));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var i=[];do i.push(t.call(this));while(this.expectOptionalToken(e));return i},e}();function j(e){var t=e.value;return z(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function z(e){return e===I.BANG||e===I.DOLLAR||e===I.AMP||e===I.PAREN_L||e===I.PAREN_R||e===I.SPREAD||e===I.COLON||e===I.EQUALS||e===I.AT||e===I.BRACKET_L||e===I.BRACKET_R||e===I.BRACE_L||e===I.PIPE||e===I.BRACE_R?'"'.concat(e,'"'):e}var q=new Map,H=new Map,V=!0,W=!1;function Q(e){return e.replace(/[\s,]+/g," ").trim()}function G(e){for(var t=[],i=1;iit});var n=i(1722),r=i(9879),s=i(5671),o=i(4796),a=i(759);class l{handle(e){e.isButton()&&(this.context.activityEmitter.emitOfferShown({offerVersionId:e.versionId}),e.registerListeners({onDismissClick:()=>this.handleOfferDismiss(e),onCtaClick:t=>this.handleOfferClick(e,t)}))}async handleOfferDismiss(e){await this.context.manager.remove(e),this.context.activityEmitter.emitOfferDismiss({offerVersionId:e.versionId})}async handleOfferClick(e,t){if(!t)return;let i=t.currentTarget;if(i.hasAttribute("data-is-acked"))return void await this.context.manager.remove(e);t.preventDefault(),t.stopImmediatePropagation(),i.setAttribute("data-is-acked","true");let n=i.style.pointerEvents;i.style.pointerEvents="none",this.context.activityEmitter.emitOfferClick({offerVersionId:e.versionId}),await (0,a.cb)(100),i.style.pointerEvents=n;let r=new URL(i.href),s=this.context.dateProvider.now()+6e4,l=(0,o.nk)(JSON.stringify({id:e.versionId,expiration:s}));r.searchParams.delete("q_offer_info"),this.offerFeatureFlags.disableQOfferInfo||r.searchParams.append("q_offer_info",l),i.setAttribute("href",r.toString()),i.click()}constructor(e,t){this.context=e,this.offerFeatureFlags=t,e.manager.subscribe("afterAdd",e=>this.handle(e))}}let c="FADE_IN",u={HeadlineBodyButton:"HEADLINE_BODY_BUTTON",HeadlineBodyForm:"HEADLINE_BODY_FORM",HeadlineButton:"HEADLINE_BUTTON",HeadlineForm:"HEADLINE_FORM",HeadlineLink:"HEADLINE_LINK"},d="BUTTON",h="FORM",p="LEFT",m="NONE",f="RIGHT",g="EMBED",v="FOOTER",b="HEADER",y="POPUP",_="SIDEBAR";var w=i(5825),E=i(2504);let A="Privacy disclosure text: ",S="data-qualified-offer-host-location",x="--qualified-offer-header-height",C="data-qualified-offer-header-ignore",T="data-qualified-offer-header-include",k="--qualified-offer-footer-height",I={desktop:{[y]:450,[_]:326},mobile:{[y]:343,[_]:326}},O={desktop:{[y]:"64px",[_]:"32px"},mobile:{[y]:"32px",[_]:"32px"}},F={mobile:{[y]:"400px",[_]:"300px"},desktop:{[y]:"400px",[_]:"300px"}},M={mobile:{[y]:"400px",[_]:"300px"},desktop:{[y]:"500px",[_]:"400px"}},P="52px",D="200px";var L=i(4464);function R(){return function(e){return function(t){return t.type===e}}}function N(e){let t=document.createElement("div");if(t.innerHTML=e.trim(),1!==t.children.length)throw Error("Expected a single element");return t.firstChild}function B(e,t){return"_qualified-offer-"+e+"-"+t}function U(e){return B("host",e)}function j(e){return B("dismiss-button",e)}function z(e){return B("form",e)}function q(e){return B("cta-button",e)}function H(e){return B("privacy-disclosure-tooltip",e)}function V(e){return B("privacy-disclosure-tooltip-target",e)}function W(e){return B("headline",e)}let{HeadlineButton:Q,HeadlineLink:G,HeadlineBodyButton:$,HeadlineForm:K,HeadlineBodyForm:Y}=u,J=R()(Q),X=R()(K),Z=R()(G),ee=R()($),et=R()(Y),ei=(e,t,i,n,r,s)=>en(e)&&en(t)&&en(i)&&en(n)&&en(r)&&en(s)?{cropPxX:e,cropPxY:t,cropPxWidth:i,cropPxHeight:n,originalPxWidth:r,originalPxHeight:s}:void 0,en=e=>"number"==typeof e&&e>=0;function er(e,t){let i=e||"";if(i&&t){let e=["trim.left="+t.cropPxX,"trim.top="+t.cropPxY,"trim.width="+t.cropPxWidth,"trim.height="+t.cropPxHeight].join(",");i=i.replace("/uploads/","/cdn-cgi/image/"+e+"/uploads/")}return i}class es{get style(){return this._style||(this._style=""),this._style}toString(){return""+this.style+this.html}constructor(e,t){this.html=e,this.components=t,this._style=null}}class eo{get root(){return this._root||(this._root=document.createElement("div")),this._root}get shadowRoot(){return this._shadowRoot||(this._shadowRoot=this.root.attachShadow({mode:"open"})),this._shadowRoot}setState(e){this.state=e,this.render()}html(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n{let s="";for(let e of[i[n]].flat()){let t=e;if(e instanceof eo||e instanceof es){let i=e instanceof eo?e.content:e;i.components.forEach(e=>r.add(e)),t=i.html}s=""+s+(null!=t?t:"")}return""+e+t+(null!=s?s:"")},"");return r.add(this),new es(s,r)}render(){return this.shadowRoot.innerHTML=this.content.toString(),this.root}classes(){for(var e=arguments.length,t=Array(e),i=0;i{var i;return null!=(i=e[t])?i:e[t]=t+"-"+this.displayName+"-"+Math.random().toString(36).slice(2)}})}constructor(e,t){this.props=e,this.state=t,this.device=window.innerWidth<=540?"mobile":"desktop",this._root=null,this._shadowRoot=null,this.cx=this.createClassesProxy()}}class ea extends eo{static withState(e){var t=this;return function(){for(var i=arguments.length,n=Array(i),r=0;r{n&&(e.preventDefault(),e.stopImmediatePropagation()),i(e)})}renderWithHeightTransition(){var e,t;let i=null==(e=this.shadowRoot)?void 0:e.querySelector(".container"),n=null==i?void 0:i.scrollHeight;if(super.render(),this.computeElements(),this.handleListeners(),!(i=null==(t=this.shadowRoot)?void 0:t.querySelector(".container"))||!n)return this.root;let r=i.scrollHeight,s=i.style.height,o=i.style.transition;return i.style.height=""+n+"px",i.style.transition="height 0.3s ease-out",i.addEventListener("transitionend",()=>{i&&(i.style.height=s,i.style.transition=o)},{once:!0}),requestAnimationFrame(()=>{r&&n&&i&&(i.style.height=""+r+"px")}),this.root}constructor(e,t,i,n,r,s){super(e,t),this.host=i,this.hasOffersFontEnhancements=n,this.hasDismissButtonAccessibilityEnabled=r,this.hasOffersFormBannerMobileImprovements=s}}class el extends ea{disableForm(){var e,t;let i=null==(e=this.elements)?void 0:e.form,n=null==(t=this.elements)?void 0:t.ctaButton;if(i){let e=null==i?void 0:i.querySelectorAll("input, button");null==e||e.forEach(e=>e.disabled=!0)}n&&n instanceof HTMLButtonElement&&(n.disabled=!0)}enableForm(){var e,t;let i=null==(e=this.elements)?void 0:e.form,n=null==(t=this.elements)?void 0:t.ctaButton;if(i){let e=null==i?void 0:i.querySelectorAll("input, button");null==e||e.forEach(e=>e.disabled=!1)}n&&n instanceof HTMLButtonElement&&(n.disabled=!1)}getEmailInputValue(){var e,t;return"emailCapture"!==this.state.current?null:null!=(t=null==(e=this.getFormValues("email"))?void 0:e[0])?t:null}getEmailFormInput(){var e,t;return null==(t=this.elements)||null==(e=t.form)?void 0:e.querySelector("input[name=email]")}getPrivacyDisclosureTooltip(){var e,t;return null==(t=this.elements)||null==(e=t.form)?void 0:e.querySelector("div[id="+H(this.props.id)+"]")}static privacyDisclosureAriaLabel(e){try{let t,{strippedValue:i,doc:n}={strippedValue:(t=new DOMParser().parseFromString(e,"text/html")).body.textContent||"",doc:t},r=Array.from(n.querySelectorAll("a")).map(e=>e.href),s="";return r.length>0&&(s=" Included links: ",r.forEach((e,t)=>{s+="Link "+(t+1)+" "+e+". "})),A+i+s}catch(t){return A+" "+e}}getFormValues(){for(var e,t=arguments.length,i=Array(t),n=0;n{n.validity.valueMissing&&n.setCustomValidity("You must enter a valid email")}),n.addEventListener("input",()=>{n.setCustomValidity(""),n.validity.valueMissing?n.setCustomValidity("You must enter a valid email"):n.setCustomValidity("")})),t}constructor(e,t,i,n,r){super(e,{current:"emailCapture"},t,i,n,r),this.ctaType=h}}let ec=[b,v],eu=[y,_],ed=[b,v];class eh{get hasActiveOffer(){return null!==this.activeOffer}handle(e){e.isForm()&&(this.context.activityEmitter.emitOfferShown({offerVersionId:e.versionId}),this.registerListeners(e))}registerListeners(e){let t=()=>{var t;return this.handlePrivacyDisclosureShown(e,e.versionId,(null==e||null==(t=e.serializedOffer)?void 0:t.privacyDisclosureId)||void 0)};eu.includes(e.location)&&t(),e.registerListeners({onDismissClick:()=>this.handleOfferDismiss(e),onFormSubmit:()=>this.handleOfferSubmit(e),onPrivacyDisclosureShown:()=>ed.includes(e.location)?t():()=>{}})}async handleOfferDismiss(e){var t;this.activeOffer&&this.activeOffer.is(e)&&this.activeOffer.isCompleted||this.context.activityEmitter.emitOfferDismiss({offerVersionId:e.versionId}),(null==(t=this.activeOffer)?void 0:t.is(e))&&(this.resumeAllFormOffers(),this.activeOffer=null),await this.context.manager.remove(e)}async handleOfferSubmit(e){var t,i;(null==(t=this.activeOffer)?void 0:t.state.current)==="end"?await this.handleOfferDismiss(e):this.activeOffer&&!this.activeOffer.is(e)?this.debugLog("Cannot submit form while another form is in progress"):(this.activeOffer||(this.activeOffer=new ep(e,this.context),this.pauseAllFormOffers()),await this.activeOffer.handleSubmission(),this.handlePrivacyDisclosureConsented(e.versionId,(null==e||null==(i=e.serializedOffer)?void 0:i.privacyDisclosureId)||void 0))}handlePrivacyDisclosureShown(e,t,i){if(t&&i){if(this.offerVersionIdToShownPrivacyDisclosureId[t])return;this.offerVersionIdToShownPrivacyDisclosureId[t]=i,this.context.activityEmitter.emitPrivacyDisclosureShown({offerVersionId:t,privacyDisclosureId:i})}if((null==e?void 0:e.getEmailFormInput())&&(null==e?void 0:e.getPrivacyDisclosureTooltip())){let t=e.getEmailFormInput(),i=e.getPrivacyDisclosureTooltip();t.tabIndex=0,i.tabIndex=-1,t.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||(i.style.display="flex",i.focus(),i.style.display="")})}}handlePrivacyDisclosureConsented(e,t){e&&t&&this.context.activityEmitter.emitPrivacyDisclosureConsented({offerVersionId:e,privacyDisclosureId:t})}pauseAllFormOffers(){if(this.activeOffer)for(let e of(this.context.manager.pause(),this.context.manager.offers))e.isForm()&&!this.activeOffer.is(e)&&e.disableForm()}resumeAllFormOffers(){for(let e of this.context.manager.offers)e.isForm()&&e.enableForm();this.context.manager.resume()}debugLog(e,t){(0,w.dI)("[form-manager] "+e,t)}constructor(e){this.context=e,this.activeOffer=null,this.offerVersionIdToShownPrivacyDisclosureId={},this.context.manager.subscribe("afterAdd",e=>this.handle(e))}}class ep{get state(){return this.offer.state}get isCompleted(){return this._isCompleted}is(e){return this.offer===e}async handleSubmission(){if(this.state.loading||"end"===this.state.current)return void this.debugLog("Cannot submit form in state "+this.state);switch(this.state.current){case"emailCapture":await this.handleEmailSubmission();break;case"followupQuestions":await this.handleFollowupQuestionsSubmission()}}async handleEmailSubmission(){let e=this.offer.getEmailInputValue();if(!e)return void this.offer.setState({current:"emailCapture",error:"Please enter a valid email"});let t=this.qualifiedFormApi.submitEmail(e);if(!t.success){let i;switch(t.error){case"empty":case"invalid":i="Please enter a valid email.";break;case"non_business":i="Please provide a business email."}this.offer.setState({current:"emailCapture",email:e,error:i});return}this.context.activityEmitter.emitOfferClick({offerVersionId:this.offer.versionId}),this.offer.setState({current:"emailCapture",email:e,loading:!0});let{form:i,action:n}=await t.result;if(this.followupQuestionsForm=i,!this.offer.isOnScreen()){i||this.markAsCompleted();return}if(!i){this.markAsCompleted(),this.handleEndAction(await n);return}await this.transitionToFollowupQuestions()}async handleFollowupQuestionsSubmission(){if(!this.followupQuestionsForm)return;let e=this.offer.getFormValues(...this.followupQuestionsForm.inputFields.map(e=>e.name));if(!e)return;let t=this.qualifiedFormApi.submitFollowUpQuestions(e);if(t.success){this.markAsCompleted(),this.offer.setState({current:"followupQuestions",email:this.offer.state.email,loading:!0},{animate:!0});let e=await t.action;if(!this.offer.isOnScreen())return;this.handleEndAction(e);return}this.offer.setState({current:"followupQuestions",email:this.offer.state.email,errors:t.errors},{animate:!0})}markAsCompleted(){this._isCompleted||(this._isCompleted=!0,this.context.activityEmitter.emitFormFill({formType:"offer",offerVersionId:this.offer.versionId}))}handleEndAction(e){"widget"===e.type?this.offer.dismiss():"redirect"===e.type&&e.url?window.location.href=e.url:this.transitionToEnd({dismiss:ec.includes(this.offer.location)})}transitionToEnd(e){let{dismiss:t=!1}=void 0===e?{}:e;t&&setTimeout(()=>this.offer.dismiss(),1e3);let i={current:"end",email:this.offer.state.email},n=[y,_].includes(this.offer.location);this.offer.setState(i,{animate:n})}async transitionToFollowupQuestions(){if(this.followupQuestionsForm){var e;this.offer.setState({current:"followupQuestions",form:this.followupQuestionsForm,email:this.offer.state.email},{animate:!ec.includes(this.offer.location)}),ec.includes(this.offer.location)&&await this.offer.update((e=this.offer.serializedOffer).currentVersion.ctaType!==h||e.currentVersion.location!==b&&e.currentVersion.location!==v?e:(0,L._)({},e,{currentVersion:(0,L._)({},e.currentVersion,{location:y,content:(0,L._)({},e.currentVersion.content,{variation:(0,L._)({},e.currentVersion.content.variation,{__typename:"ContentVariationHeadlineBodyForm",type:u.HeadlineBodyForm,bodyStyle:e.currentVersion.content.variation.headlineStyle}),animation:{type:c}})})}),{animate:!0,copyListeners:!0,copyState:!0})}}debugLog(e,t){(0,w.dI)("[offer-main-script] "+e,t)}constructor(e,t){this.offer=e,this.context=t,this.followupQuestionsForm=null,this._isCompleted=!1,this.qualifiedFormApi=new E.Dj({source:"offers",config:e.qualifiedFormConfig,channel:this.context.channel,iframeManager:this.context.iframeManager,offerId:this.offer.serializedOffer.id})}}class em{get iframeManager(){return this.getIframeManager()}constructor(e,t,i,n,r){this.activityEmitter=e,this.dateProvider=t,this.channel=i,this.manager=n,this.getIframeManager=r}}class ef{static setup(e){this.renderer=e}static create(e){if(null===this.renderer)throw Error("Renderer is not set");return new eg(e)}get serializedOffer(){return this._serializedOffer}get offerId(){return this.serializedOffer.id}get versionId(){return this.serializedOffer.currentVersion.id}get position(){return this.serializedOffer.position}get location(){return this.serializedOffer.currentVersion.location}get ctaType(){return this.serializedOffer.currentVersion.ctaType}get variationType(){return this.serializedOffer.currentVersion.content.variation.type}get qualifiedFormConfig(){var e;return null!=(e=this.serializedOffer.currentVersion.qualifiedFormConfig)?e:{validateBusinessEmail:!1,emailField:{type:"email",label:"Email",placeholder:"Business email"},assetUrl:"",additionalFields:[]}}get renderer(){if(null===ef.renderer)throw Error("Renderer is not set");return ef.renderer}async render(e){if(void 0===e&&(e={}),!this.isOnScreen()&&!this.isRendering){if(this.isRemoving)throw Error("Attempting to render an offer while it is being removed");this.isRendering=!0,this._staticOffer=await this.renderer.render(this.serializedOffer,e),this.isRendering=!1}}async remove(e){if(void 0===e&&(e={}),this.isOnScreen()&&!this.isRemoving){if(this.isRendering)throw Error("Attempting to remove an offer while it is being rendered");this.isRemoving=!0,await this.renderer.remove(this.serializedOffer,e),this._staticOffer=null,this.isRemoving=!1}}async animate(){this.isOnScreen()&&(await this.remove({animate:!0}),await new Promise(e=>setTimeout(e,250))),await this.render({animate:!0})}async update(e,t){if(void 0===t&&(t={}),e.id!==this.serializedOffer.id)throw Error("Cannot update with a different offer");if(!this.isOnScreen()){this._serializedOffer=e,await this.render(t);return}let i=this.staticOffer,n=t.copyState&&this.ctaType===e.currentVersion.ctaType?this.staticOffer.state:void 0;this.location!==e.currentVersion.location?(await this.remove(t),this._serializedOffer=e,await this.render((0,L._)({},t,{state:n}))):(this._serializedOffer=e,this._staticOffer=this.renderer.update(this._serializedOffer,n)),t.copyListeners&&this.staticOffer.copyListeners(i)}isOnScreen(){return null!==this._staticOffer}isForm(){return this.isOnScreen()&&this.ctaType===h}isButton(){return this.isOnScreen()&&this.ctaType!==h}constructor(e){this._staticOffer=null,this.isRendering=!1,this.renderingPromise=null,this.isRemoving=!1,this.removingPromise=null,this._serializedOffer=e}}ef.renderer=null;class eg extends ef{get staticOffer(){if(null===this._staticOffer)throw Error("Offer is not on screen");return this._staticOffer}get staticOfferId(){return this.staticOffer.id}get state(){return this.staticOffer.state}dismiss(){this.staticOffer.dismiss()}enableForm(){this.staticOffer.enableForm()}disableForm(){this.staticOffer.disableForm()}getEmailInputValue(){return this.staticOffer.getEmailInputValue()}getEmailFormInput(){return this.staticOffer.getEmailFormInput()}getPrivacyDisclosureTooltip(){return this.staticOffer.getPrivacyDisclosureTooltip()}getFormValues(){for(var e=arguments.length,t=Array(e),i=0;i{this.subscribers[e].delete(t)}}pause(){this.subscribers.beforePause.forEach(e=>e()),this._isPaused=!0,this.subscribers.afterPause.forEach(e=>e())}resume(){this.subscribers.beforeResume.forEach(e=>e()),this._isPaused=!1,this.subscribers.afterResume.forEach(e=>e())}async add(e,t){if(void 0===t&&(t=!1),this.isPaused&&!t)return;let i=this.renderedOffers.get(e.currentVersion.location);if(i&&i.position<=e.position)return;let n=ef.create(e);this.renderedOffers.set(e.currentVersion.location,n),i&&await this.remove(i),this.renderedOffers.get(e.currentVersion.location)===n&&(this.subscribers.beforeAdd.forEach(t=>t(e)),await n.render({animate:!0}),this.subscribers.afterAdd.forEach(e=>e(n)))}async remove(e){this.subscribers.beforeRemove.forEach(t=>t(e)),this.renderedOffers.get(e.location)===e&&this.renderedOffers.delete(e.location),await e.remove({animate:!0}),this.subscribers.afterRemove.forEach(t=>t(e))}async clear(e){let{except:t}=e;this.subscribers.beforeClear.forEach(e=>e());let i=[...this.renderedOffers.values()].filter(e=>!t.some(t=>t.id===e.serializedOffer.id));await Promise.all(i.map(e=>this.remove(e))),this.subscribers.afterClear.forEach(e=>e())}constructor(){this._isPaused=!1,this.renderedOffers=new Map,this.subscribers={beforeAdd:new Set,afterAdd:new Set,beforeRemove:new Set,afterRemove:new Set,beforeClear:new Set,afterClear:new Set,beforePause:new Set,afterPause:new Set,beforeResume:new Set,afterResume:new Set}}}var eb=i(3851);function ey(){for(var e=arguments.length,t=Array(e),i=0;in=!0,run:async()=>{for(let e of t){if(n)return;let t=e();t instanceof Promise&&await t}}}}var e_=i(6439);class ew{static get(e){var t;return null!=(t=this.instances[e])?t:this.instances[e]=new ew(e)}static requestOwnership(e,t){let i=this.ownerships.get(e);return i&&i!==t?((0,w.dI)("[CSSVarsManager] "+t+" requested ownership of "+e+" but it is already owned by "+i),!1):(this.ownerships.set(e,t),!0)}static removeOwnership(e,t){let i=this.ownerships.get(e);return i&&i!==t?((0,w.dI)("[CSSVarsManager] "+t+" requested to remove ownership of "+e+" but it is owned by "+i),!1):(this.ownerships.delete(e),!0)}set(e,t){ew.requestOwnership(e,this.scope)&&this.map.get(e)!==t&&(this.root.style.setProperty(e,t),this.map.set(e,t))}remove(e){!ew.removeOwnership(e,this.scope)||this.map.has(e)&&(this.root.style.removeProperty(e),this.map.delete(e))}get(e){return this.map.get(e)}dispose(){for(let e of this.map.keys())this.remove(e);this.map.clear(),delete ew.instances[this.scope]}constructor(e){this.scope=e,this.root=document.documentElement,this.map=new Map}}function eE(e,t){let i=!1,n=null;return function(){for(var r=arguments.length,s=Array(r),o=0;o{e.apply(this,n),i=!1,n=null},t),i=!0)}}ew.instances={},ew.ownerships=new Map;class eA{init(e){this.isDisposed=!1,this.target=e,this.lastWidth=e.offsetWidth,this.lastHeight=e.offsetHeight,this.observer.observe(e,{box:"border-box"})}dispose(){this.isDisposed=!0,this.observer.disconnect(),this.target=null,this.lastHeight=null,this.lastWidth=null}_callback(e){this.isDisposed||this.callback(e)}constructor(e,t="both",i=0){this.callback=e,this.watch=t,this.lastWidth=null,this.lastHeight=null,this.target=null,this.isDisposed=!0,this._onResize=e=>{if(!this.target)return;let t=this.target.offsetWidth!==this.lastWidth;if("width"===this.watch&&!t)return;let i=this.target.offsetHeight!==this.lastHeight;"height"===this.watch&&!i||(t||i)&&(this.lastWidth=this.target.offsetWidth,this.lastHeight=this.target.offsetHeight,this._callback(this.target))},this.onResize=i>0?eE(this._onResize,i):this._onResize,this.observer=new ResizeObserver(this.onResize)}}class eS{static setup(){this.isInitialized||("registerProperty"in window.CSS&&window.CSS.registerProperty({name:k,syntax:"",inherits:!0,initialValue:"0px"}),this.isInitialized=!0)}createHost(e){return N('\n
\n ')}insertHost(e){document.body.appendChild(e)}afterInsertAnimation(e){this.updateFooterHeight(e),this.hostResizeObserver.init(e)}beforeRemoveAnimation(){this.hostResizeObserver.dispose()}removeHost(e){e.remove(),this.cssVars.dispose()}constructor(){this.cssVars=ew.get("footer"),this.updateFooterHeight=e=>{this.cssVars.set(k,""+e.offsetHeight+"px")},this.hostResizeObserver=new eA(this.updateFooterHeight,"height",250)}}eS.isInitialized=!1;class ex{init(){this.isDisposed=!1}dispose(){for(let[e]of(this.isDisposed=!0,this.observedElements))this.unobserveElement(e)}observe(e){if(!this.isDisposed)for(let t of e)this.observeElement(t)}unobserve(e){if(!this.isDisposed)for(let t of e)this.unobserveElement(t)}revertTransitions(e){for(let t of e){let e=this.observedElements.get(t);e&&(t.style.transition=e.originalTransition)}}reapplyTransitions(e){for(let t of e)if(this.observedElements.has(t)){let e=this.observedElements.get(t);e&&(t.style.transition=e.newTransition)}}pause(){this.isDisposed||(this.isPaused=!0)}resume(){this.isDisposed||(this.isPaused=!1)}observeElement(e){if(this.observedElements.has(e))return;let t=this.addTransitionsToElement(e),i=this.createTransitionCallback(e);e.addEventListener("transitionstart",i),this.observedElements.set(e,(0,L._)({callback:i},t))}unobserveElement(e){let t=this.observedElements.get(e);if(t){let{callback:i,originalTransition:n}=t;e.removeEventListener("transitionstart",i),e.style.transition=n}this.observedElements.delete(e)}createTransitionCallback(e){return t=>{!this.isPaused&&!this.isDisposed&&t.target===e&&this.observedProperties.has(t.propertyName)&&this._callback([e])}}addTransitionsToElement(e){let t=e.style.transition,{transitionProperty:i,transition:n}=getComputedStyle(e),r=i.split(",").map(e=>e.trim()).filter(e=>e&&"none"!==e),s=[];for(let e of this.observedProperties)r.includes(e)||s.push(e+" "+this.TRANSITION_DURATION+" allow-discrete");if(s.length>0){let t=[n,...s].filter(e=>e&&"none"!==e);e.style.transition=t.join(", ")}return{originalTransition:t,newTransition:e.style.transition}}constructor(e,t){this.callback=t,this.TRANSITION_DURATION="1ms",this.isDisposed=!0,this.isPaused=!1,this.observedElements=new Map,this._callback=e=>{this.isDisposed||this.isPaused||this.callback(e)},this.observedProperties=new Set(e)}}class eC{static setConfig(e){this.config=e}static get useCssTransitionObserver(){var e;return(null==(e=this.config)?void 0:e.useCssTransitionObserver)&&CSS.supports("transition-behavior","allow-discrete")}init(){this.isDisposed=!1,this.mutationObserver=new MutationObserver(this.mutationCallback),eC.useCssTransitionObserver&&(this.cssTransitionObserver=new ex(this.observedProperties,this.cssTransitionCallback),this.cssTransitionObserver.init())}dispose(){var e,t;null==(e=this.mutationObserver)||e.disconnect(),null==(t=this.cssTransitionObserver)||t.dispose(),this.observedElements.clear(),this.isDisposed=!0}observe(e){var t;if(!this.isDisposed)for(let i of(null==(t=this.cssTransitionObserver)||t.observe(e),e))this.observedElements.has(i)||(this.observeElement(i),this.observedElements.add(i))}unobserve(e){var t,i;if(!this.isDisposed){for(let i of(null==(t=this.mutationObserver)||t.disconnect(),e))this.observedElements.delete(i);for(let e of this.observedElements)this.observeElement(e);null==(i=this.cssTransitionObserver)||i.unobserve(e)}}pause(){var e;if(!this.isDisposed&&!this.isPaused){if(this.isPaused=!0,this.mutationObserver){let e=this.mutationObserver.takeRecords();this.mutationCallback(e,this.mutationObserver),this.mutationObserver.disconnect(),this.mutationObserver=null}null==(e=this.cssTransitionObserver)||e.pause()}}resume(){var e;if(!this.isDisposed&&this.isPaused){if(this.isPaused=!1,!this.mutationObserver)for(let e of(this.mutationObserver=new MutationObserver(this.mutationCallback),this.observedElements))this.observeElement(e);null==(e=this.cssTransitionObserver)||e.resume()}}observeElement(e){var t;null==(t=this.mutationObserver)||t.observe(e,{attributes:!0,attributeFilter:["style","class",C,T]})}constructor(e,t){this.observedProperties=e,this.callback=t,this.isDisposed=!0,this.isPaused=!1,this.observedElements=new Set,this.mutationObserver=null,this.cssTransitionObserver=null,this.mutationCallback=e=>{if(this.isDisposed)return;let t=new Set;for(let i of e)i.target instanceof HTMLElement&&this.observedElements.has(i.target)&&t.add(i.target);if(t.size>0){if(this.cssTransitionObserver){var i;this.pause(),null==(i=this.cssTransitionObserver)||i.revertTransitions(t),this.resume(),requestAnimationFrame(()=>{var e;this.pause(),null==(e=this.cssTransitionObserver)||e.reapplyTransitions(t),this.resume()})}this.callback(t)}},this.cssTransitionCallback=e=>{this.isDisposed||this.callback(e)}}}eC.config=null;class eT{static wrap(e,t){return e?e.replace(this.CSS_PLACEHOLDER,t):t}static getRuleWrapper(e){if(!e.parentRule)return;let t=e,i=this.CSS_PLACEHOLDER;for(;t.parentRule;)t.parentRule instanceof CSSGroupingRule&&(i=t.parentRule.cssText.split("{")[0]+" { "+i+" }"),t=t.parentRule;return i}}eT.CSS_PLACEHOLDER="{{QUALIFIED_CSS_PLACEHOLDER}}";class ek{add(){for(var e=arguments.length,t=Array(e),i=0;ithis.executeBatch())}cancelScheduledExecution(){null!==this.scheduledExecution&&(this.scheduledExecution&&cancelAnimationFrame(this.scheduledExecution),this.scheduledExecution=null)}executeBatch(){this.processBatch([...this.pendingItems]),this.pendingItems.length=0,this.scheduledExecution=null}constructor(e){this.processBatch=e,this.pendingItems=[],this.scheduledExecution=null}}let eI="qualified-offer-style-element-";class eO{static isStyleElementWrapper(e){return e.id.startsWith(eI)}addRule(e){this._rules.push(e)}clearRules(){this._rules=[]}writeRules(){let e="";for(let t of this._rules)e+=t;this.styleElement.textContent=e}init(e){let{disabled:t=!1,rules:i=[]}=void 0===e?{}:e;for(let e of i)this.addRule(e);i.length>0&&this.writeRules(),t||this.enable()}dispose(){this.styleElement.textContent="",this._rules=[],this.styleElement.remove()}enable(){this.styleElement.isConnected||(document.head.appendChild(this.styleElement),queueMicrotask(()=>{this.styleElement.isConnected||document.body.appendChild(this.styleElement)}))}disable(){this.styleElement.remove()}constructor(){this.id=""+eI+eO.id++,this._rules=[],this.styleElement=document.createElement("style"),this.styleElement.id=this.id}}eO.id=0;let eF=[["position","fixed"],["position","sticky"],["top","*"]],eM=["position:fixed","position:sticky","top:*"];class eP{get rules(){return this.observedSelectorValue.rules}constructor(e){this.observedSelectorValue=e}}class eD{get rules(){return this._rulesInfo}hasRule(e){return this._rules.has(e)}addRule(e){this._rules.has(e)||(this._rules.add(e),this._rulesInfo.add({rule:e,selector:e.selectorText,priority:e.style.getPropertyPriority(this.property),value:e.style.getPropertyValue(this.property),wrapper:eT.getRuleWrapper(e)}))}clear(){this._rules.clear(),this._rulesInfo.clear()}constructor(e){this.property=e,this.readonly=new eP(this),this._rulesInfo=new Set,this._rules=new Set}}class eL{get(e){return this.selectors.get(e)}constructor(e){this.selectors=e}}class eR{get(e){return this._map.get(e).readonly}getChangedProperties(e){let{clear:t=!1}=void 0===e?{}:e,i=new Set(this._changedProperties);return t&&this.clearChangedProperties(),i}addRule(e,t){let i=this._map.get(e);i.hasRule(t)||(i.addRule(t),this.setChangedProperties(e))}clear(){for(let e of this._map.values())e.clear();this.setChangedProperties(...this._map.keys())}setChangedProperties(){for(var e=arguments.length,t=Array(e),i=0;i{try{e.sheet?t(void 0):(e.addEventListener("load",t),e.addEventListener("error",i),e.addEventListener("abort",i),e.addEventListener("timeout",i))}catch(e){i(Error("Failed to load cross-origin stylesheet"))}}));await Promise.race([Promise.allSettled(n).then(()=>this.selectorUpdateQueue.executeImmediately()),new Promise(e=>setTimeout(e,5e3))])}observe(e,t){return void 0===t&&(t=eM),e!==eB.noop&&this.unobserve(eB.noop),this.initialize(),this.observers.set(e,t),this.selectorUpdateQueue.executeImmediately(),()=>this.unobserve(e)}unobserve(e){this.observers.delete(e)}dispose(){var e,t;null==(e=this.styleNodesObserver)||e.disconnect(),this.styleNodesObserver=null,this.selectorUpdateQueue.clearAndCancel(),null==(t=this.crossOriginStylesheetsHolder)||t.remove(),this.observers.clear(),this.observedSelectors.clear(),this.initialized=!1}initialize(){if(!this.initialized)for(let e of(this.initialized=!0,this.insertCrossOriginStylesheetHolder(),this.styleNodesObserver=new MutationObserver(this.handleStyleMutations),this.styleNodesObserver.observe(document.head,{childList:!0}),this.styleNodesObserver.observe(document.body,{childList:!0}),this.styleNodesObserver.observe(this.crossOriginStylesheetsHolder.shadowRoot,{childList:!0}),document.styleSheets))this.handle(e)}insertCrossOriginStylesheetHolder(){this.crossOriginStylesheetsHolder=document.createElement("div"),this.crossOriginStylesheetsHolder.style.display="none",this.crossOriginStylesheetsHolder.attachShadow({mode:"open"}),document.body.appendChild(this.crossOriginStylesheetsHolder)}shouldHandle(e){return!new URL(e instanceof HTMLLinkElement?e.href:e).searchParams.has("family")}handle(e){if(e instanceof HTMLStyleElement&&eO.isStyleElementWrapper(e))return;let t=e instanceof CSSStyleSheet?e:e.sheet;if(!t)return;let i=null;if(t.href&&!t.href.startsWith(window.location.origin)&&t.ownerNode instanceof HTMLLinkElement&&(null===t.ownerNode.crossOrigin||"use-credentials"===t.ownerNode.crossOrigin))return void this.handleCrossOriginStylesheet(t);try{i=t.cssRules}catch(i){var n,r;this.debugLog("Failed to get css rules",{href:null!=(n=t.href)?n:"no href"}),e instanceof HTMLElement&&e.hasAttribute(eN)?(this.debugLog("Failed to get css rules with cross origin node",{href:null!=(r=t.href)?r:"no href"}),e.remove()):this.handleCrossOriginStylesheet(t);return}this.iterateRules(i),e instanceof HTMLElement&&e.hasAttribute(eN)&&e.remove()}handleCrossOriginStylesheet(e){var t,i,n,r;let s;(null==(t=eB.config)?void 0:t.handleCrossOriginStylesheets)&&e.href&&this.shouldHandle(e.href)&&(e.ownerNode instanceof HTMLLinkElement?s=e.ownerNode.cloneNode():((s=document.createElement("link")).href=null!=(r=e.href)?r:"",s.rel="stylesheet"),s.crossOrigin="anonymous",s.setAttribute("async",""),s.setAttribute(eN,""),null==(n=this.crossOriginStylesheetsHolder)||null==(i=n.shadowRoot)||i.appendChild(s))}iterateRules(e){for(let t of null!=e?e:[]){if(t instanceof CSSGroupingRule&&this.iterateRules(t.cssRules),t instanceof CSSImportRule){this.handle(t.styleSheet);continue}if(t instanceof CSSStyleRule)for(let e=0;ee.has(t))&&t(this.current)}debugLog(e,t){(0,w.dI)("[StyleSelectorObserver] "+e,t)}constructor(){this.initialized=!1,this.observedSelectors=new eR,this.styleNodesObserver=null,this.crossOriginStylesheetsHolder=null,this.observers=new Map,this.handleStyleMutations=e=>{let t=new Set;for(let i of e)if("childList"===i.type)for(let e of i.addedNodes)(e instanceof HTMLStyleElement||e instanceof HTMLLinkElement&&"stylesheet"===e.rel)&&t.add(e);for(let e of t)e instanceof HTMLStyleElement&&this.requestUpdate(e),e instanceof HTMLLinkElement&&this.shouldHandle(e)&&e.addEventListener("load",()=>this.requestUpdate(e))},this.processNodes=e=>{for(let t of e)this.handle(t);if(0===this.observers.size)return;let t=this.observedSelectors.getChangedProperties({clear:!0});0!==t.size&&this.notify(t)},this.selectorUpdateQueue=new ek(this.processNodes)}}eB.config=null,eB.instance=null,eB.noop=()=>{};class eU{init(){this.styleSelectorObserver.observe(this.onSelectorChange,[""+this.options.property+":*"]),this.onSelectorChange(this.styleSelectorObserver.current)}dispose(){this.styleSelectorObserver.unobserve(this.onSelectorChange)}writeStyles(e){let t=0;for(let{selector:i,value:n,priority:r,wrapper:s}of e.rules){let e=":is("+i+")["+this.options.dataAttribute+"]",o=""===r?"":"!important",a="0"===n?"0px":n,l="";l="auto"===a?this.getAutoRuleCssText(e,o):this.isVar(a)?this.getVarRuleCssText(e,a,o):this.getRuleCssText(e,a,o);let c=s?eT.wrap(s,l):l;this.options.styleElement.addRule(c),t++}t>0&&this.options.styleElement.writeRules()}getAutoRuleCssText(e,t){return e+" { "+this.options.property+": auto "+t+"; }"}getRuleCssText(e,t,i){return e+" { "+this.options.property+": calc("+t+" + "+this.options.offsetCssValue+") "+i+"; }"}isVar(e){return e.trim().match(/^var\(--.*\)$/)}getVarRuleCssText(e,t,i){let n=t.replace(/^(var\([^,)]+,\s*)0(\s*\))$/,"$10px$2"),r=n.replace(/^var\(([^,)]+).*\)$/,"$1"),s="calc("+n+" * 1px)";return[this.getRuleCssText(e,n,i),"@container style("+r+": 0) { "+this.getRuleCssText(e,s,i)+"}",this.getRuleCssText(e+':is([style*="'+r+'"])',n,i),this.getRuleCssText(e+':is([style*="'+r+':0"])',s,i)].join("")}constructor(e){this.options=e,this.styleSelectorObserver=eB.getInstance(),this.onSelectorChange=e=>{let t=e.get(""+this.options.property+":*");t&&this.writeStyles(t)}}}let ej="--qualified-offer-header-inline-style-offset";class ez{init(){this.isDisposed=!1,this.elements.clear()}dispose(){for(let[e,t]of this.elements)this.restoreElement(e,t);this.elements.clear(),this.isDisposed=!0}add(e){if(this.isDisposed||this.elements.has(e))return;let t=e.style.getPropertyValue(this.options.property);if(!t)return;let i=e.style.getPropertyPriority(this.options.property);this.elements.set(e,{priority:i,value:t}),this.shiftElement(e,{priority:i,value:t})}update(e){if(this.isDisposed)return;if(!this.elements.has(e))return void this.add(e);let t=e.style.getPropertyValue(this.options.property);if(!t)return void this.elements.delete(e);if(t.includes(ej))return;let i=e.style.getPropertyPriority(this.options.property);this.elements.set(e,{priority:i,value:t}),this.shiftElement(e,{priority:i,value:t})}remove(e){if(this.isDisposed||!this.elements.has(e))return;let{priority:t,value:i}=this.elements.get(e);this.elements.delete(e),e.style.getPropertyValue(this.options.property).includes(ej)&&this.restoreElement(e,{priority:t,value:i})}restoreElement(e,t){let{value:i,priority:n}=t;e.style.setProperty(this.options.property,i,n)}shiftElement(e,t){let{value:i,priority:n}=t;e.style.setProperty(this.options.property,"calc("+i+" + var("+ej+", "+this.options.offsetCssValue+"))",n)}constructor(e){this.options=e,this.isDisposed=!0,this.elements=new Map}}class eq{init(){this.isDisposed=!1,this.selectorObserver.observe(this.onSelectorChange),this.observe()}dispose(){this.disconnect(),this.selectorObserver.unobserve(this.onSelectorChange),this.isDisposed=!0}observe(){document.addEventListener("animationstart",this.eventHandler),this.styleElement.init({rules:this.getAllRules()})}disconnect(){document.removeEventListener("animationstart",this.eventHandler),this.styleElement.dispose(),this.newElementsQueue.clearAndCancel()}getAllRules(){let e=[this.selectorObserver.current.includedSelector,...this.selectorObserver.current.rules],t=":is("+this.selectorObserver.current.ignoredSelector+")",i=["@keyframes "+this.animationName+" {}"];for(let n of e)i.push(this.getRule(n,t));return i}getRule(e,t){let i=this.getSelector(e,t),n=this.getWrapper(e),r=this.getCssText(i);return eT.wrap(n,r)}getSelector(e,t){return":is("+("string"==typeof e?e:e.selector)+"):not("+t+")"}getWrapper(e){return"string"==typeof e?void 0:e.wrapper}getCssText(e){return e+" { animation: "+this.animationName+" 1ms; }"}constructor(e,t){this.selectorObserver=e,this.callback=t,this.animationName="qualified-offer-element-observer-animation-"+eq.id++,this.isDisposed=!0,this.styleElement=new eO,this.onSelectorChange=()=>{this.newElementsQueue.executeImmediately(),this.disconnect(),this.observe()},this.eventHandler=e=>{e.animationName===this.animationName&&e.target instanceof HTMLElement&&this.newElementsQueue.addAndSchedule(e.target)},this.processBatch=e=>{this.isDisposed||0===e.length||this.callback([...new Set(e)])},this.newElementsQueue=new ek(this.processBatch)}}eq.id=0;class eH{init(){this.isDisposed=!1,window.addEventListener("resize",this.onResize)}dispose(){window.removeEventListener("resize",this.onResize),this.isDisposed=!0}_callback(){this.isDisposed||this.callback()}constructor(e,t="both",i=0){this.callback=e,this.watch=t,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,this.isDisposed=!0,this._onResize=()=>{let e=window.innerWidth!==this.lastWidth;if("width"===this.watch&&!e)return;let t=window.innerHeight!==this.lastHeight;"height"===this.watch&&!t||(e||t)&&(this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,this._callback())},this.onResize=i>0?eE(this._onResize,i):this._onResize}}class eV{init(e){let{initialElements:t}=void 0===e?{}:e;this.isDisposed=!1,this.newElementsObserver.init(),this.elementStyleChangeObserver.init(),this.windowResizeObserver.init(),this.observedElements.clear(),t&&(this.addElements(t),this.onUpdateElements())}dispose(){this.newElementsObserver.dispose(),this.elementStyleChangeObserver.dispose(),this.windowResizeObserver.dispose(),this.observedElements.clear(),this.isDisposed=!0}pauseChangeObserver(){this.elementStyleChangeObserver.pause()}resumeChangeObserver(){this.elementStyleChangeObserver.resume()}addElements(e){for(let t of e)this.observedElements.add(t);this.elementStyleChangeObserver.observe(e)}removeElements(e){for(let t of e)this.observedElements.delete(t);this.elementStyleChangeObserver.unobserve(e)}_callback(e){this.isDisposed||this.callback(e)}constructor(e,t){this.selectorObserver=e,this.callback=t,this.isDisposed=!0,this.observedElements=new Set,this.onNewElements=e=>{if(this.isDisposed)return;let t=[];for(let i of e)!this.observedElements.has(i)&&i.matches(this.selectorObserver.current.value)&&t.push(i);0!==t.length&&(this.addElements(t),this._callback({added:t,removed:[],changed:[]}))},this.onUpdateElements=e=>{if(void 0===e&&(e=this.observedElements),this.isDisposed)return;let t=[],i=[],n=this.selectorObserver.current;for(let r of e)this.observedElements.has(r)&&(r.matches(n.value)?i.push(r):t.push(r));(0!==t.length||0!==i.length)&&(this.removeElements(t),this._callback({added:[],removed:t,changed:i}))},this.newElementsObserver=new eq(e,this.onNewElements),this.elementStyleChangeObserver=new eC(["position"],this.onUpdateElements),this.windowResizeObserver=new eH(this.onUpdateElements,"width",250)}}class eW{get value(){return this._value}computeValue(){return":is("+[this.includedSelector,...this.rules.map(e=>e.selector)].join(",")+"):not(:is("+this.ignoredSelector+"))"}constructor(e,t,i){this.rules=e,this.includedSelector=t,this.ignoredSelector=i,this._value=this.computeValue()}}class eQ{get current(){var e;return null!=(e=this._current)?e:this._current=this.compute(this.styleSelectorObserver.current)}init(){this.isDisposed=!1,this.styleSelectorObserver.observe(this.onSelectorChange,this.properties)}dispose(){this.styleSelectorObserver.unobserve(this.onSelectorChange),this.isDisposed=!0,this.observers.clear()}observe(e){return this.observers.add(e),()=>this.unobserve(e)}unobserve(e){this.observers.delete(e)}constructor(e,t){this.compute=e,this.properties=t,this.styleSelectorObserver=eB.getInstance(),this.isDisposed=!0,this._current=null,this.observers=new Set,this.onSelectorChange=()=>{if(this.isDisposed)return;let{didChange:e,newObservable:t}=this.computeNewObservable();if(e)for(let e of(this._current=t,this.observers))e(t)},this.computeNewObservable=()=>{var e;let t=this.compute(this.styleSelectorObserver.current);return(null==(e=this._current)?void 0:e.value)===t.value?{didChange:!1,newObservable:t}:{didChange:!0,newObservable:t}}}}class eG{get elements(){return this.shiftedElements}init(){this.isDisposed=!1,this.shiftedElements=new Set}dispose(){if(this.isDisposed=!0,this.shiftedElements){for(let e of this.shiftedElements)e.removeAttribute(this.options.dataAttribute);this.shiftedElements.clear(),this.shiftedElements=null}}add(e){this.shiftedElements&&!this.isDisposed&&(this.shiftedElements.add(e),e.setAttribute(this.options.dataAttribute,"true"))}has(e){var t,i;return null!=(i=null==(t=this.shiftedElements)?void 0:t.has(e))&&i}remove(e){this.shiftedElements&&!this.isDisposed&&(this.shiftedElements.delete(e),e.removeAttribute(this.options.dataAttribute))}constructor(e){this.options=e,this.shiftedElements=null,this.isDisposed=!0}}let e$={header:["htmlOffset","externalStylesOffset"]};class eK{static get(e){var t;return null!=(t=this.instances[e])?t:this.instances[e]=new eK(e,e$[e])}get(e){return this.styleElements[e]}dispose(){for(let e of this.ids)this.styleElements[e].dispose();delete eK.instances[this.key]}constructor(e,t){for(const i of(this.key=e,this.ids=t,this.styleElements={},t))this.styleElements[i]=new eO}}eK.instances={};let eY="qualified-offer-header-shifted-element";class eJ{static get ignoredSelectors(){return this._ignoredSelectors}static get includedSelectors(){return this._includedSelectors}static async setup(e){this.isInitialized||("registerProperty"in window.CSS&&window.CSS.registerProperty({name:x,syntax:"",inherits:!0,initialValue:"0px"}),e&&(eB.setConfig(e),eC.setConfig(e)),(null==e?void 0:e.excludedSelectors)&&(this._ignoredSelectors+=",:is("+e.excludedSelectors+")"),(null==e?void 0:e.includedSelectors)&&(this._includedSelectors+=",:is("+e.includedSelectors+")"),await eB.getInstance().load(),this.isInitialized=!0)}createHost(e){return N('\n
\n ')}insertHost(e){this.initialize(),this.shiftedElementsManager.init(),this.insertHostInWebsite(e),this.initHtmlOffsetStyles(),this.inlineStyleManager.init(),this.externalStyleManager.init(),this.prepareInitialShiftedElements(),this.styles.get("externalStylesOffset").init()}afterInsertAnimation(e){null==this.restoreInitialShiftedElements||this.restoreInitialShiftedElements.call(this),this.updateHeaderHeight(e),this.selectorObserver.init(),this.matchingElementsObserver.init({initialElements:this.shiftedElementsManager.elements}),this.hostResizeObserver.init(e)}beforeRemoveAnimation(){this.selectorObserver.dispose(),this.matchingElementsObserver.dispose(),this.hostResizeObserver.dispose(),this.prepareExitShiftedElements()}removeHost(e){e.remove(),this.shiftedElementsManager.dispose(),this.externalStyleManager.dispose(),this.inlineStyleManager.dispose(),this.styles.dispose(),this.cssVars.dispose(),null==this.restoreExitShiftedElements||this.restoreExitShiftedElements.call(this)}initialize(){this.isInitialized||(this.selectorObserver=this.createSelectorObserver(),this.matchingElementsObserver=new eV(this.selectorObserver,this.handleMatchingElements),this.hostResizeObserver=new eA(this.updateHeaderHeight,"height",250),this.externalStyleManager=new eU({property:"top",styleElement:this.styles.get("externalStylesOffset"),offsetCssValue:"var("+x+", 0px)",dataAttribute:eY}),this.inlineStyleManager=new ez({property:"top",offsetCssValue:"var("+x+", 0px)"}),this.shiftedElementsManager=new eG({dataAttribute:eY}),this.isInitialized=!0)}insertHostInWebsite(e){document.body.insertBefore(e,document.body.firstElementChild)}initHtmlOffsetStyles(){let{marginTop:e,minHeight:t}=window.getComputedStyle(document.documentElement);this.styles.get("htmlOffset").init({rules:["html {\n "+("100%"===t?"":"height: calc(100dvh - "+e+" - var("+x+")) !important;")+"\n margin-top: calc("+e+" + var("+x+")) !important;\n top: 0 !important;\n position: relative !important;\n overflow-y: visible !important;\n }"]})}prepareInitialShiftedElements(){let{restoreTransitions:e}=this.handleMatchingElements({added:document.querySelectorAll(this.selectorObserver.current.value),removed:[],changed:[]},{shouldRestoreTransitions:!1});this.restoreInitialShiftedElements=()=>{e(),this.restoreInitialShiftedElements=null}}prepareExitShiftedElements(){var e;if(!(null==(e=this.shiftedElementsManager.elements)?void 0:e.size))return;let t=new Map;for(let e of this.shiftedElementsManager.elements){let{transition:i}=window.getComputedStyle(e);t.set(e,{transition:i})}let i=this.disableTransitions([t]);this.restoreExitShiftedElements=()=>{i(),this.restoreExitShiftedElements=null}}processMatchingElements(e){let t=new Map,i=new Map,n=new Map;for(let i of e.added){if(this.shiftedElementsManager.has(i))continue;let{position:e,transition:n}=window.getComputedStyle(i);this.shouldShiftElement(i,e)&&t.set(i,{position:e,transition:n})}for(let r of e.changed){let{position:e,transition:s}=window.getComputedStyle(r);if(!this.shouldShiftElement(r,e)){n.set(r,{position:e,transition:s});continue}if(!this.shiftedElementsManager.has(r)){t.set(r,{position:e,transition:s});continue}i.set(r,{position:e,transition:s})}for(let t of e.removed){if(!this.shiftedElementsManager.has(t))continue;let{position:e,transition:i}=window.getComputedStyle(t);n.set(t,{position:e,transition:i})}return{added:t,changed:i,removed:n}}addElement(e){this.shiftedElementsManager.add(e),this.inlineStyleManager.add(e)}updateElement(e){this.inlineStyleManager.update(e)}removeElement(e){this.inlineStyleManager.remove(e),this.shiftedElementsManager.remove(e)}shouldShiftElement(e,t){return!e.hasAttribute(C)&&(!!e.hasAttribute(T)||"fixed"===t||"sticky"===t)}createSelectorObserver(){return new eQ(e=>new eW([...e.get("position:fixed").rules,...e.get("position:sticky").rules],eJ.includedSelectors,eJ.ignoredSelectors),["position:fixed","position:sticky"])}disableTransitions(e){let t=new Map;for(let i of e)for(let[e,{transition:n}]of i)"none"!==n&&""!==n&&t.set(e,{value:e.style.getPropertyValue("transition"),priority:e.style.getPropertyPriority("transition")});for(let e of t.keys())e.style.setProperty("transition","none","important");return()=>{for(let[e,{value:i,priority:n}]of t.entries())i?e.style.setProperty("transition",i,n):e.style.removeProperty("transition")}}constructor(){this.styles=eK.get("header"),this.cssVars=ew.get("header"),this.isInitialized=!1,this.restoreInitialShiftedElements=null,this.restoreExitShiftedElements=null,this.updateHeaderHeight=e=>{this.cssVars.set(x,""+e.offsetHeight+"px")},this.handleMatchingElements=(e,t)=>{let{shouldRestoreTransitions:i=!0}=void 0===t?{}:t;this.matchingElementsObserver.pauseChangeObserver();let{added:n,changed:r,removed:s}=this.processMatchingElements(e),o=this.disableTransitions([n,r,s]);try{for(let[e]of n)this.addElement(e);for(let[e]of r)this.updateElement(e);for(let[e]of s)this.removeElement(e)}finally{i&&o()}return this.matchingElementsObserver.resumeChangeObserver(),{restoreTransitions:o}}}}eJ.isInitialized=!1,eJ._ignoredSelectors=["["+S+"]","dialog",'[role="dialog"]',"#q-messenger-frame","["+C+"]"].join(","),eJ._includedSelectors=['*[style*="position:fixed"]','*[style*="position: fixed"]','*[style*="position:sticky"]','*[style*="position: sticky"]',"["+T+"]"].join(",");class eX{get animations(){return this.options.animations}then(e,t){return this.promise.then(e,t)}catch(e){return this.promise.catch(e)}finally(e){return this.promise.finally(e)}constructor(e){this.options=e,this[Symbol.toStringTag]="AnimationResult";const t=[],i=Promise.all(e.animations.map(e=>e.finished));if(t.push(i),e.timeout){const i=new Promise(t=>setTimeout(()=>t(null),e.timeout));t.push(i)}this.promise=Promise.race(t).then(t=>null===t?((0,w.dI)("Animation timed out",{timeout:String(e.timeout)}),[]):t),this.promise.finally(()=>null==e.cleanup?void 0:e.cleanup.call(e))}}class eZ{animate(){switch(this.config.type){case"simple":return new eX(this.createSimpleAnimation(this.config,!1));case"complex":return new eX(this.createComplexAnimation(this.config,!1))}}reverse(){switch(this.config.type){case"simple":return new eX(this.createSimpleAnimation(this.config,!0));case"complex":return new eX(this.createComplexAnimation(this.config,!0))}}createSimpleAnimation(e,t){let i=t?[...e.keyframes].reverse():e.keyframes,n=[{element:this.host,keyframes:i}];if(e.additionalElements)for(let{element:r,keyframes:s}of e.additionalElements){let e=s?t?[...s].reverse():s:i;n.push({element:r,keyframes:e})}return{animations:n.map(t=>{let{element:i,keyframes:n}=t;return i.animate(n,e.options)}),timeout:this.getTimeout(e.options),cleanup:e.cleanup}}createComplexAnimation(e,t){let{options:i,perform:n}=e,{animations:r,cleanup:s}=n(this.host,{options:i,reverse:t});return{animations:r,cleanup:s,timeout:this.getTimeout(i)}}getTimeout(e){var t;let i=Number(null!=(t=e.duration)?t:0);return Math.min(1.5*i,i+1e3)}constructor(e,t){this.host=e,this.config=t}}class e0{get(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return this.fadeIn(e);switch(t.type){case"SLIDE_UP":return this.slideUp(e);case"SLIDE_RIGHT":return this.slideRight(e);case"PUSH_DOWN":return this.pushDown(e);case c:return this.fadeIn(e);default:throw Error("Unknown animation: "+t.type)}}}class e1 extends e0{slideUp(e){let{offsetHeight:t}=e,i=e.style.getPropertyValue("bottom");return e.style.setProperty("bottom","calc(-"+t+"px + var("+k+", 0px))"),new eZ(document.documentElement,{type:"simple",keyframes:[{[k]:"0px"},{[k]:""+t+"px"}],options:this.options,cleanup:()=>e.style.setProperty("bottom",i)})}pushDown(e){return new eZ(e,{type:"simple",keyframes:[{transform:"translateY(-100%)"},{transform:"translateY(0)"}],options:this.options})}fadeIn(e){return new eZ(e,{type:"simple",keyframes:[{opacity:0},{opacity:1}],options:this.options})}slideRight(e){return new eZ(e,{type:"simple",keyframes:[{transform:"translateX(-100%)"},{transform:"translateX(0)"}],options:this.options})}constructor(...e){super(...e),this.options={duration:300,easing:"ease-out"}}}class e2 extends e0{slideUp(e){return new eZ(e,{type:"simple",keyframes:[{transform:"translateY(100%)"},{transform:"translateY(0)"}],options:this.options})}fadeIn(e){return new eZ(e,{type:"simple",keyframes:[{opacity:0},{opacity:1}],options:this.options})}slideRight(e){return new eZ(e,{type:"simple",keyframes:[{transform:"translateX(-100%)"},{transform:"translateX(0)"}],options:this.options})}pushDown(e){let{offsetHeight:t}=e,i=e.style.getPropertyValue("top");return e.style.setProperty("top","calc(-"+t+"px + var("+x+", 0px))"),new eZ(document.documentElement,{type:"simple",keyframes:[{[x]:"0px"},{[x]:""+t+"px"}],options:this.options,cleanup:()=>e.style.setProperty("top",i)})}constructor(...e){super(...e),this.options={duration:300,easing:"ease-out"}}}class e3 extends e0{slideUp(e){return new eZ(e,{type:"simple",keyframes:[{opacity:0},{opacity:1}],options:this.options,additionalElements:[{element:e.firstElementChild,keyframes:[{transform:"translateY(50%)"},{transform:"translateY(0)"}]}]})}pushDown(e){return new eZ(e,{type:"simple",keyframes:[{opacity:0},{opacity:1}],options:this.options,additionalElements:[{element:e.firstElementChild,keyframes:[{transform:"translateY(-50%)"},{transform:"translateY(0)"}]}]})}fadeIn(e){return new eZ(e,{type:"simple",keyframes:[{opacity:0},{opacity:1}],options:this.options})}slideRight(e){return new eZ(e,{type:"simple",keyframes:[{opacity:0},{opacity:1}],options:this.options,additionalElements:[{element:e.firstElementChild,keyframes:[{transform:"translateX(-50%)"},{transform:"translateX(0)"}]}]})}constructor(...e){super(...e),this.options={duration:300,easing:"ease-out"}}}class e4 extends e0{slideUp(e){return new eZ(e,{type:"simple",keyframes:[{transform:"translateY(100%)"},{transform:"translateY(0)"}],options:this.options})}pushDown(e){return new eZ(e,{type:"simple",keyframes:[{transform:"translateY(-100%)"},{transform:"translateY(0)"}],options:this.options})}fadeIn(e){return new eZ(e,{type:"simple",keyframes:[{opacity:0},{opacity:1}],options:this.options})}slideRight(e){return new eZ(e,{type:"simple",keyframes:[{transform:"translateX(-100%)"},{transform:"translateX(0)"}],options:this.options})}constructor(...e){super(...e),this.options={duration:300,easing:"ease-out"}}}class e5{getAnimator(e,t,i){let n=this.ANIMATION_MANAGERS[t];if(!n)throw Error("Unknown location: "+t);return n.get(e,i)}constructor(){this.ANIMATION_MANAGERS={[v]:new e1,[b]:new e2,[y]:new e3,[_]:new e4,[g]:null}}}var e6=i(7423);function e9(e){let{name:t}=e.prototype.constructor;return({[t]:class extends e{constructor(...e){super(...e),this.host.innerHTML="",this.host.appendChild(this.render())}}})[t]}function e8(){let e=(0,e6._)(['\n \n ',"\n \n "]);return e8=function(){return e},e}function e7(){let e=(0,e6._)(['\n \n "]);return e7=function(){return e},e}function te(){let e=(0,e6._)(['\n \n "]);return te=function(){return e},e}function tt(){let e=(0,e6._)(['\n \n "]);return tt=function(){return e},e}function ti(){let e=(0,e6._)(['\n \n "]);return ti=function(){return e},e}class tn extends eo{get style(){var e,t,i,n;let{borderColor:r,borderRadius:s,backgroundColor:o,color:a,fontFamily:l}=this.props;return"\n .cta {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n gap: 10px;\n line-height: 150%;\n text-decoration: none;\n "+(l?"font-family: '"+l+"';":"")+"\n margin: 0;\n font-size: 14px;\n box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.06);\n color: "+(null!=a?a:"#FFF")+";\n text-align: center;\n border: 1px solid "+(null!=r?r:"transparent")+";\n border-radius: "+(null!=s?s:"0px")+";\n }\n\n .cta.modal {\n height: 40px;\n padding: 4px 16px;\n align-self: stretch;\n background: "+(null!=o?o:"#000")+";\n "+(this.shouldSetDefaultFontWeight?"font-weight: 600;":"font-weight: unset;")+"\n flex-shrink: 0;\n\n &:is(:focus-visible) {\n outline: 2px solid "+(null!=(t=null!=(e=this.props.focusRingColor)?e:a)?t:"#FFF")+";\n outline-offset: 2px;\n filter: brightness(0.9);\n }\n\n &:is(:active:not(:disabled)) {\n scale: 0.97;\n }\n }\n\n .cta.banner-button {\n height: 32px;\n padding: 0px 24px;\n background: "+(null!=o?o:"#4E55FD")+";\n "+(this.shouldSetDefaultFontWeight?"font-weight: 500;":"font-weight: unset;")+"\n\n /* Set width to max-content to prevent line break in button text */\n max-width: max-content;\n min-width: max-content;\n width: max-content;\n\n &:is(:focus-visible) {\n outline: 2px solid "+(null!=(n=null!=(i=this.props.focusRingColor)?i:a)?n:"#FFF")+";\n outline-offset: 2px;\n filter: brightness(0.9);\n }\n\n &:is(:active:not(:disabled)) {\n scale: 0.97;\n }\n }\n\n .cta.banner-button.submit {\n height: 32px;\n }\n\n .banner-link {\n text-decoration: underline;\n color: "+(null!=a?a:"#FFF")+";\n font-size: 16px;\n "+(this.shouldSetDefaultFontWeight?"font-weight: 600;":"font-weight: unset;")+"\n flex: none;\n }\n "}get content(){switch(this.props.type){case"modal-button":return this.modalButton;case"modal-submit":return this.modalSubmit;case"banner-button":return this.bannerButton;case"banner-link":return this.bannerLink;case"banner-submit":return this.bannerSubmit}}get buttonId(){return q(this.props.id)}get modalButton(){return this.html(e8(),this.buttonId,this.props.href,this.target,this.props.text)}get modalSubmit(){return this.html(e7(),this.buttonId,this.props.formId,this.props.text)}get bannerButton(){return this.html(te(),this.buttonId,this.props.href,this.target,this.props.text)}get bannerLink(){return this.html(tt(),this.buttonId,this.props.href,this.target,this.props.text)}get bannerSubmit(){return this.html(ti(),this.buttonId,this.props.text)}get target(){return"NEW_PAGE"===this.props.deliveryType?"_blank":"_self"}constructor(e,t){var i;super(e,null),this.hasOffersFontEnhancements=t,this.displayName="Button",this.shouldSetDefaultFontWeight=!0,(null==(i=this.props.text)?void 0:i.includes("

"))&&this.hasOffersFontEnhancements&&(this.shouldSetDefaultFontWeight=!1)}}function tr(){let e=(0,e6._)(['\n \n ']);return tr=function(){return e},e}class ts extends eo{get style(){let{focusRingColor:e,color:t,borderRadius:i,isModal:n,hasDismissButtonAccessibilityEnabled:r}=this.props;if(r){var s;return"\n .dismiss-button {\n position: absolute;\n top: 8px;\n right: 6px;\n background: none;\n border: 1px solid transparent;\n border-radius: "+(null!=i?i:"0px")+";\n cursor: pointer;\n margin: 0;\n padding: 10px;\n\n @media (max-width: 540px) {\n top: 12px;\n right: 6px;\n }\n\n &:is(:focus-visible) {\n outline: 2px solid "+(null!=(s=null!=e?e:t)?s:"#FFF")+";\n }\n }\n\n .dismiss-button > svg {\n display: block;\n margin: 0;\n width: "+(n?"16px":"12px")+";\n height: "+(n?"16px":"12px")+";\n padding: 0;\n }\n "}return"\n .dismiss-button {\n position: absolute;\n top: 18px;\n right: "+(n?"16px":"12px")+";\n width: "+(n?"16px":"12px")+";\n height: "+(n?"16px":"12px")+";\n background: none;\n border: none;\n cursor: pointer;\n margin: 0;\n padding: 0;\n\n @media (max-width: 540px) {\n top: 22px;\n right: 16px;\n }\n\n &:is(:focus, :focus-visible) {\n outline: 2px solid "+(null!=t?t:"white")+";\n outline-offset: 2px;\n }\n }\n\n .dismiss-button > svg {\n display: block;\n margin: 0;\n padding: 0;\n }\n "}get content(){let{id:e,color:t}=this.props;return this.html(tr(),j(e),null!=t?t:"white")}constructor(e){super(e,null),this.displayName="DismissButton"}}function to(){let e=(0,e6._)(['\n \n ']);return to=function(){return e},e}function ta(){let e=(0,e6._)([""]);return ta=function(){return e},e}class tl extends eo{get style(){return this.imageUrl?"\n ."+this.FOREGROUND_IMAGE_CLASS_NAME+" {\n position: relative;\n\n height: "+P+";\n max-height: "+P+";\n min-height: "+P+";\n\n /* z-index ensures image displays over banner */\n z-index: 1;\n\n "+(this.isPlacementLeft&&this.isPositionFixed?"position: absolute;":"")+"\n "+(this.isPlacementLeft&&this.isPositionFixed?"left: "+this.FOREGROUND_IMAGE_LEFT_PADDING+";":"")+"\n "+(this.isPlacementLeft&&this.isPositionHugContent?"position: relative;":"")+"\n\n "+(this.isPlacementRight&&this.isPositionFixed?"position: absolute;":"")+"\n "+(this.isPlacementRight&&this.isPositionFixed?"right: "+this.FOREGROUND_IMAGE_RIGHT_PADDING+";":"")+"\n "+(this.isPlacementRight&&this.isPositionHugContent?"position: relative;":"")+"\n }\n ":""}get prependedContent(){return!this.hasImage||this.isPlacementRight?null:this.content}get appendedContent(){return!this.hasImage||this.isPlacementLeft?null:this.content}get content(){return this.imageUrl?this.html(to(),this.imageUrl,this.FOREGROUND_IMAGE_CLASS_NAME,this.altText):this.html(ta())}get hasImage(){return!!(this.props.foregroundImageUrl&&this.props.foregroundImageConfig&&!this.isPlacementNone&&!this.isPlacementTop&&!this.isMobile)}get isPlacementNone(){return this.props.foregroundImageConfig.placement.type===m}get isPlacementTop(){return"TOP"===this.props.foregroundImageConfig.placement.type}get isPlacementLeft(){return!!this.hasImage&&this.props.foregroundImageConfig.placement.type===p}get isPlacementRight(){return!!this.hasImage&&this.props.foregroundImageConfig.placement.type===f}get isPositionFixed(){return"FIXED"===this.props.foregroundImageConfig.position.type}get isPositionHugContent(){return"HUG_CONTENT"===this.props.foregroundImageConfig.position.type}get cropSettings(){return ei(this.props.foregroundImageConfig.cropPxX,this.props.foregroundImageConfig.cropPxY,this.props.foregroundImageConfig.cropPxWidth,this.props.foregroundImageConfig.cropPxHeight,this.props.foregroundImageConfig.originalPxWidth,this.props.foregroundImageConfig.originalPxHeight)}get imageUrl(){return this.props.foregroundImageUrl&&this.cropSettings?er(this.props.foregroundImageUrl,this.cropSettings):null}get altText(){return"Promotional banner image in page "+(this.props.location===b?"header":"footer")+" and placed "+(this.isPlacementLeft?"to the left of":"to the right of")+" promotional content"}constructor(e){super(e,null),this.displayName="ForegroundImageBanner",this.FOREGROUND_IMAGE_CLASS_NAME="foreground-image",this.FOREGROUND_IMAGE_LEFT_PADDING="12px",this.FOREGROUND_IMAGE_RIGHT_PADDING="35px"}}function tc(){let e=(0,e6._)(['\n

\n "]);return tc=function(){return e},e}function tu(){let e=(0,e6._)(['\n \n "]);return tu=function(){return e},e}function td(){let e=(0,e6._)(["\n \n "]);return td=function(){return e},e}function th(){let e=(0,e6._)(["\n \n "]);return th=function(){return e},e}class tp extends eo{get style(){let{color:e,fontFamily:t}=this.props;return"\n .headline {\n font-weight: unset;\n "+(t?"font-family: '"+t+"';":"")+"\n margin: 0;\n padding: 0;\n overflow-wrap: anywhere;\n }\n\n .headline.modal {\n color: "+(null!=e?e:"#1B1B1B")+";\n font-size: 32px;\n "+(this.shouldSetDefaultFontWeight?"font-weight: 600;":"font-weight: unset;")+"\n line-height: 1.2;\n text-align: left;\n flex-shrink: 0;\n }\n\n .headline.modal.sidebar {\n font-size: 24px;\n }\n\n .headline.banner {\n color: "+(null!=e?e:"#FFF")+";\n font-size: 16px;\n "+(this.shouldSetDefaultFontWeight?"font-weight: 200;":"font-weight: unset;")+"\n line-height: 150%;\n max-width: 100%;\n max-height: 180px;\n overflow: hidden;\n }\n "}get content(){switch(this.props.type){case"banner":return this.banner;case"banner-link":return this.bannerLink;case"modal":return this.modal;case"sidebar-modal":return this.sidebarModal}}get banner(){return this.html(tc(),this.props.text)}get bannerLink(){return this.html(tu(),this.props.text,this.props.link)}get modal(){let e=this.props.offerId?'id="'+W(this.props.offerId)+'"':"";return this.html(td(),e,this.props.text)}get sidebarModal(){let e=this.props.offerId?'id="'+W(this.props.offerId)+'"':"";return this.html(th(),e,this.props.text)}constructor(e,t){var i;super(e,null),this.hasOffersFontEnhancements=t,this.displayName="Headline",this.shouldSetDefaultFontWeight=!0,(null==(i=this.props.text)?void 0:i.includes("

"))&&this.hasOffersFontEnhancements&&(this.shouldSetDefaultFontWeight=!1)}}function tm(){let e=(0,e6._)(['\n

\n
\n ',"\n ","\n ","\n ","\n
\n ","\n
\n "]);return tm=function(){return e},e}class tf extends ea{get style(){var e;let{variation:t}=this.props,i="";return this.isMobile&&(i="\n .container {\n padding: 15px 32px;\n\n .headline-cta {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: space-between;\n text-align: left;\n width: auto;\n\n .banner {\n margin-right: 4px;\n max-width: 100%;\n }\n\n .headline {\n padding: 0;\n }\n }\n }\n "),"\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n gap: 32px;\n align-items: center;\n background: "+(null!=(e=t.headlineStyle.backgroundColor)?e:"#000")+";\n box-shadow: 0px -1px 28px 0px rgba(0, 0, 0, 0.00);\n margin: 0;\n padding: 0 36px;\n height: auto;\n max-height: "+D+";\n\n .headline-cta {\n display: flex;\n gap: 32px;\n align-items: center;\n justify-content: center;\n text-align: left;\n width: 100%;\n\n .headline {\n padding: 14px 0;\n }\n }\n\n p {\n margin: 0;\n }\n }\n\n .background-image-wrapper {\n "+(this.backgroundImageUrl?"\n background-image: url("+this.backgroundImageUrl+");\n background-position: center;\n background-size: cover;\n ":"")+"\n }\n\n "+i+"\n "}get content(){return this.html(tm(),this.backgroundImageUrl?"background-image-wrapper":"",this.foregroundImage.prependedContent,this.headline,this.cta,this.foregroundImage.appendedContent,this.dismissButton)}get cta(){let{buttonStyle:e,buttonText:t,buttonUrl:i,assetDeliveryType:n,headlineStyle:r}=this.props.variation;return new tn((0,L._)({},e,{id:this.id,text:t,href:i,deliveryType:n,type:"banner-button",focusRingColor:r.color}),this.hasOffersFontEnhancements)}get headline(){let{headlineStyle:e,headlineText:t}=this.props.variation;return new tp((0,L._)({},e,{text:t,type:"banner"}),this.hasOffersFontEnhancements)}get dismissButton(){var e,t;if(!this.props.allowDismiss)return null;let{headlineStyle:i,buttonStyle:n}=this.props.variation;return new ts({id:this.id,color:this.props.variation.headlineStyle.color,focusRingColor:null!=(e=null==i?void 0:i.color)?e:null,borderRadius:null!=(t=null==n?void 0:n.borderRadius)?t:"0px",hasDismissButtonAccessibilityEnabled:this.hasDismissButtonAccessibilityEnabled})}get location(){return this.props.location}constructor(e,t,i,n){super(e,null,t,i,n),this.displayName="ButtonBanner",this.type=u.HeadlineButton,this.ctaType=d,this.foregroundImage=new tl({location:this.location,foregroundImageConfig:this.props.foregroundImageConfig,foregroundImageUrl:this.props.foregroundImageUrl})}}function tg(){let e=(0,e6._)(['\n
\n ',"\n
\n "]);return tg=function(){return e},e}tf=(0,n.Cg)([e9,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",["undefined"==typeof ButtonBannerProps?Object:ButtonBannerProps,"undefined"==typeof HTMLElement?Object:HTMLElement,Boolean,Boolean])],tf);class tv extends eo{get style(){let{color:e,fontFamily:t,allowScroll:i}=this.props;return"\n .body {\n color: "+(null!=e?e:"#1B1B1B")+";\n font-size: 14px;\n line-height: 22px;\n "+(t?"font-family: '"+t+"';":"")+"\n margin: 0;\n padding: 0;\n text-align: left;\n max-height: 60vh;\n "+(i?"overflow-y: auto;":"")+"\n overflow-wrap: anywhere;\n }\n "}get content(){return this.html(tg(),this.props.text)}constructor(e){super(e,null),this.displayName="Body"}}function tb(){let e=(0,e6._)(['\n
\n \n
\n ']);return tb=function(){return e},e}function ty(){let e=(0,e6._)(['\n
\n
\n ',"\n
\n
\n "]);return ty=function(){return e},e}class t_ extends eo{get style(){return this.imageUrl?"\n ."+this.FOREGROUND_IMAGE_CLASS_NAME_WRAPPER+" {\n height: auto;\n overflow: hidden;\n display: flex;\n align-self: stretch;\n }\n ."+this.FOREGROUND_IMAGE_CLASS_NAME+" {\n max-width: "+this.maxWidth+";\n max-height: "+this.maxHeight+";\n min-width: 100%;\n min-height: 100%;\n object-fit: cover;\n }\n ":"\n ."+this.FOREGROUND_IMAGE_CLASS_NAME_WRAPPER+" {\n display: flex;\n align-self: stretch;\n }\n ."+this.FOREGROUND_IMAGE_MISSING_CLASS_NAME+" {\n width: "+(this.isMobile?this.FOREGROUND_IMAGE_MISSING_MOBILE_SIZE:this.FOREGROUND_IMAGE_MISSING_DEFAULT_SIZE)+";\n height: "+(this.isMobile?this.FOREGROUND_IMAGE_MISSING_MOBILE_SIZE:this.FOREGROUND_IMAGE_MISSING_DEFAULT_SIZE)+";\n min-width: 100%;\n min-height: 100%;\n background-color: #E6E9EC;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n "}get isPlacementHorizontal(){return this.isPlacementLeft||this.isPlacementRight}get isPlacementVertical(){return this.isPlacementTop}get prependedContent(){return!this.hasImage||this.isPlacementRight?null:this.content}get appendedContent(){return!this.hasImage||this.isPlacementLeft||this.isPlacementTop?null:this.content}get content(){return this.imageUrl?this.html(tb(),this.FOREGROUND_IMAGE_CLASS_NAME_WRAPPER,this.imageUrl,this.FOREGROUND_IMAGE_CLASS_NAME,this.defaultAltText):this.html(ty(),this.FOREGROUND_IMAGE_CLASS_NAME_WRAPPER,this.FOREGROUND_IMAGE_MISSING_CLASS_NAME,tw)}get hasImage(){return!!(this.props.foregroundImageConfig&&!this.isPlacementNone)}get isPlacementNone(){return this.props.foregroundImageConfig.placement.type===m}get isPlacementTop(){return!!this.hasImage&&(this.isMobile||"TOP"===this.props.foregroundImageConfig.placement.type)}get isPlacementLeft(){return!!this.hasImage&&!this.isMobile&&this.props.foregroundImageConfig.placement.type===p}get isPlacementRight(){return!!this.hasImage&&!this.isMobile&&this.props.foregroundImageConfig.placement.type===f}get maxHeight(){return F[this.device][this.props.location]}get maxWidth(){return M[this.device][this.props.location]}get cropSettings(){return ei(this.props.foregroundImageConfig.cropPxX,this.props.foregroundImageConfig.cropPxY,this.props.foregroundImageConfig.cropPxWidth,this.props.foregroundImageConfig.cropPxHeight,this.props.foregroundImageConfig.originalPxWidth,this.props.foregroundImageConfig.originalPxHeight)}get imageUrl(){return this.props.foregroundImageUrl&&this.cropSettings?er(this.props.foregroundImageUrl,this.cropSettings):null}get defaultAltText(){return this.props.location,"Promotional popup image placed "+(this.isPlacementLeft?"to the left of":this.isPlacementRight?"to the right of":"above")+" promotional content"}constructor(e){super(e,null),this.displayName="ForegroundImageModal",this.FOREGROUND_IMAGE_CLASS_NAME_WRAPPER="foreground-image-wrapper",this.FOREGROUND_IMAGE_CLASS_NAME="foreground-image",this.FOREGROUND_IMAGE_MISSING_CLASS_NAME="foreground-image-missing",this.FOREGROUND_IMAGE_MISSING_DEFAULT_SIZE="400px",this.FOREGROUND_IMAGE_MISSING_MOBILE_SIZE="200px"}}let tw='\n \n \n \n \n \n \n';function tE(){let e=(0,e6._)(['\n \n
\n ',"\n ",'\n
\n ',"\n ","\n ","\n
\n ","\n ","\n
\n ","\n \n "]);return tE=function(){return e},e}class tA extends ea{get style(){var e;let{variation:t}=this.props;return"\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n background: "+(null!=(e=t.headlineStyle.backgroundColor)?e:"#FFF")+";\n margin: 0;\n overflow: hidden;\n box-shadow: 0px 2px 8px 1px #00000033;\n p {\n margin: 0;\n }\n max-width: 90vw;\n max-height: 90dvh;\n }\n\n .content-container {\n display: flex;\n width: "+I[this.device][this.location]+"px;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: "+O[this.device][this.location]+";\n gap: 24px;\n box-sizing: border-box;\n align-self: center;\n }\n\n .image-container {\n width: 100%;\n height: 100%;\n max-height: 90dvh;\n max-width: 90vw;\n display: flex;\n flex-direction: "+(this.foregroundImage.isPlacementHorizontal?"row":"column")+";\n align-items: stretch;\n }\n\n .background-image-wrapper {\n "+(this.backgroundImageUrl?"\n background-image: url("+this.backgroundImageUrl+");\n background-size: cover;\n background-position: center;\n display: flex;\n align-items: center;\n ":"")+"\n }\n "}get content(){return this.html(tE(),this.foregroundImage.prependedContent,this.backgroundImageUrl?'
':"",this.headline,this.body,this.cta,this.backgroundImageUrl?"
":"",this.foregroundImage.appendedContent,this.dismissButton)}get headline(){let{headlineStyle:e,headlineText:t}=this.props.variation,i=this.props.location===_?"sidebar-modal":"modal";return new tp((0,L._)({},e,{text:t,type:i,offerId:this.id}),this.hasOffersFontEnhancements)}get body(){let{bodyStyle:e,bodyText:t}=this.props.variation;return new tv((0,L._)({},e,{text:t}))}get cta(){let{buttonStyle:e,buttonText:t,buttonUrl:i,assetDeliveryType:n,headlineStyle:r}=this.props.variation;return new tn((0,L._)({},e,{type:"modal-button",id:this.id,text:t,href:i,deliveryType:n,focusRingColor:r.color}),this.hasOffersFontEnhancements)}get dismissButton(){var e,t,i;if(!this.props.allowDismiss)return null;let{buttonStyle:n,headlineStyle:r}=this.props.variation;return new ts({id:this.id,isModal:!0,color:null!=(e=this.props.variation.headlineStyle.color)?e:"#1B1B1B",focusRingColor:null!=(t=null==r?void 0:r.color)?t:null,borderRadius:null!=(i=null==n?void 0:n.borderRadius)?i:"0px",hasDismissButtonAccessibilityEnabled:this.hasDismissButtonAccessibilityEnabled})}get location(){return this.props.location}constructor(e,t,i,n){super(e,null,t,i,n),this.displayName="ButtonModal",this.type=u.HeadlineBodyButton,this.ctaType=d,this.foregroundImage=new t_({location:this.location,foregroundImageConfig:this.props.foregroundImageConfig,foregroundImageUrl:this.props.foregroundImageUrl})}}tA=(0,n.Cg)([e9,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",["undefined"==typeof ButtonModalProps?Object:ButtonModalProps,"undefined"==typeof HTMLElement?Object:HTMLElement,Boolean,Boolean])],tA);var tS=i(7050);function tx(){let e=(0,e6._)(['\n
\n ',"\n ","\n
\n "]);return tx=function(){return e},e}function tC(){let e=(0,e6._)(["\n \n ","\n \n "]);return tC=function(){return e},e}class tT extends eo{get wrapper(){var e=this;return function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r\n
\n ',"\n ",'\n
\n ',"\n ","\n
\n ","\n
\n ","\n \n "]);return tI=function(){return e},e}function tO(){let e=(0,e6._)(["",""]);return tO=function(){return e},e}function tF(){let e=(0,e6._)(['\n
\n \n
\n ',"\n
\n
\n "]);return tF=function(){return e},e}function tM(){let e=(0,e6._)(['\n \n "]);return tM=function(){return e},e}function tP(){let e=(0,e6._)(["",""]);return tP=function(){return e},e}class tD extends el{get style(){var e,t,i,n;let{headlineStyle:r,buttonStyle:s}=this.props.variation,o=Math.min(parseInt(null!=(e=s.borderRadius)?e:"0",10),4),a="";return this.isMobile&&(a=this.hasOffersFormBannerMobileImprovements?"\n .container {\n padding: 16px 32px;\n\n .headline-cta {\n display: flex;\n flex-direction: column;\n gap: 12px;\n justify-content: space-between;\n text-align: left;\n\n .banner {\n margin-right: 4px;\n max-width: 100%;\n }\n\n .form {\n flex-wrap: wrap;\n width: 100%;\n }\n\n ."+this.cx.input+" {\n flex-grow: 1;\n width: auto;\n }\n\n .cta.banner-button.submit{\n padding-top: 4.5px;\n padding-bottom: 4.5px;\n line-height: 1.5;\n flex-grow: 1;\n min-width: 0;\n height: unset;\n max-width: unset;\n }\n\n .cta.banner-button.submit div:first-child {\n min-width: 0;\n word-wrap: break-word;\n }\n\n .headline {\n padding: 0;\n }\n\n #"+H(this.props.id)+" {\n word-break: break-word;\n overflow-wrap: break-word;\n }\n }\n }\n ":"\n .container {\n padding: 16px 32px;\n\n .headline-cta {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: space-between;\n text-align: left;\n width: auto;\n\n .banner {\n margin-right: 4px;\n max-width: 100%;\n }\n\n .headline {\n padding: 0;\n }\n }\n }\n "),"\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n gap: 32px;\n align-items: center;\n background: "+(null!=(t=r.backgroundColor)?t:"#000")+";\n box-shadow: 0px -1px 28px 0px rgba(0, 0, 0, 0.00);\n margin: 0;\n padding: 0 36px;\n max-height: "+D+";\n\n p {\n margin: 0;\n }\n\n .headline-cta {\n display: flex;\n gap: 32px;\n align-items: center;\n justify-content: center;\n text-align: left;\n width: 100%;\n\n .headline {\n padding: 14px 0;\n }\n }\n }\n\n .background-image-wrapper {\n "+(this.backgroundImageUrl?"\n background-image: url("+this.backgroundImageUrl+");\n background-position: center;\n background-size: cover;\n ":"")+"\n }\n\n .form {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n ."+this.cx.input+" {\n font-family: "+(null!=(i=r.fontFamily)?i:"inherit")+";\n font-size: 14px;\n height: 32px;\n width: 230px;\n box-sizing: border-box;\n border: 1px solid rgba(200, 206, 208, 0.93);\n border-radius: "+o+'px;\n padding: 8px 16px;\n color: #1B1B1B;\n outline: none;\n background-color: white;\n &:is(:focus, :focus-visible):not(&[readonly]):not(&[aria-invalid="true"]) {\n border-color: '+(s.backgroundColor||r.color)+";\n outline: 2px solid "+(s.backgroundColor||r.color)+";\n outline-offset: 2px;\n }\n &::placeholder {\n color: #6E7879;\n }\n }\n\n ."+this.cx.input+'[aria-invalid="true"] {\n border-color: #E4251B;\n outline: 2px solid #E4251B;\n padding-right: 32px;\n }\n\n .'+this.cx.inputErrorContainer+" {\n position: relative;\n }\n\n ."+this.cx.inputErrorIcon+" {\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n\n & svg {\n fill: #E4251B;\n }\n }\n\n #"+H(this.props.id)+" {\n font-family: "+(null!=(n=r.fontFamily)?n:"inherit")+";\n justify-content: center;\n min-width: 100%;\n text-align: left;\n white-space: normal;\n }\n\n "+a+"\n "}get content(){return this.html(tI(),this.backgroundImageUrl?"background-image-wrapper":"",this.foregroundImage.prependedContent,this.headline,z(this.id),this.input,this.button,this.foregroundImage.appendedContent,this.dismissButton)}get headline(){let{headlineStyle:e,headlineText:t}=this.props.variation;return new tp((0,L._)({},e,{text:t,type:"banner"}),this.hasOffersFontEnhancements)}get buttonText(){var e,t,i;if(this.state.loading||"followupQuestions"===this.state.current)return(0,tS.Cw)(null!=(e=this.props.variation.buttonStyle.color)?e:"#FFF",11);switch(this.state.current){case"emailCapture":return null!=(t=this.props.variation.buttonText)?t:"Submit";case"end":return'\n \n \n \n'}}get button(){let{buttonStyle:e,headlineStyle:t}=this.props.variation;return new tn((0,L._)({},e,{id:this.id,text:this.buttonText,type:"banner-submit",focusRingColor:t.color}),this.hasOffersFontEnhancements)}get dismissButton(){var e,t;if(!this.props.allowDismiss)return null;let{headlineStyle:i,buttonStyle:n}=this.props.variation;return new ts({id:this.id,color:this.props.variation.headlineStyle.color,focusRingColor:null!=(e=null==i?void 0:i.color)?e:null,borderRadius:null!=(t=null==n?void 0:n.borderRadius)?t:"0px",hasDismissButtonAccessibilityEnabled:this.hasDismissButtonAccessibilityEnabled})}get location(){return this.props.location}get input(){var e,t;if("emailCapture"===this.state.current&&this.state.error)return this.html(tF(),this.cx.inputErrorContainer,this.cx.input,(null==(t=this.props.variation.emailField)?void 0:t.placeholder)||"name@business.com",this.state.email,this.cx.inputErrorIcon,this.errorTooltip(tO(),tk));let i=this.html(tM(),this.cx.input,(null==(e=this.props.variation.emailField)?void 0:e.placeholder)||"name@business.com",this.state.email&&"value="+this.state.email,this.privacyDisclosureTooltip&&' id="'+V(this.props.id)+'"\n aria-describedby="'+H(this.props.id)+'"\n data-1p-ignore="true"\n data-lpignore="true"\n ');return this.privacyDisclosureTooltip?this.privacyDisclosureTooltip(tP(),i):i}get errorTooltip(){return new tT({text:"emailCapture"===this.state.current&&this.state.error||"",placement:this.location===b?"bottom":"top",target:{event:"always"},fontFamily:this.props.variation.headlineStyle.fontFamily,offsetY:9}).wrapper}get privacyDisclosureTooltip(){return this.props.privacyDisclosureText&&"emailCapture"===this.state.current?new tT({text:this.props.privacyDisclosureText,placement:this.props.location===v?"top":"bottom",target:{selector:"."+this.cx.input,event:"focus"},tooltipId:H(this.props.id),ariaLabel:""+tD.privacyDisclosureAriaLabel(this.props.privacyDisclosureText),hasOffersFormBannerMobileImprovements:this.hasOffersFontEnhancements&&this.isMobile}).wrapper:null}constructor(...e){super(...e),this.displayName="FormBanner",this.type=u.HeadlineForm,this.foregroundImage=new tl({location:this.location,foregroundImageConfig:this.props.foregroundImageConfig,foregroundImageUrl:this.props.foregroundImageUrl})}}tD=(0,n.Cg)([e9],tD);class tL{static get thin(){var e;return null!=(e=this._thin)?e:this._thin=""+tL.getScrollBarWidth("thin")+"px"}static get auto(){var e;return null!=(e=this._auto)?e:this._auto=""+tL.getScrollBarWidth("auto")+"px"}static getScrollBarWidth(e){let t=document.createElement("div");t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",t.style.setProperty("scrollbar-width",e),document.body.appendChild(t);let i=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),i}}function tR(){let e=(0,e6._)(['\n
\n
\n ',"\n
\n
\n "]);return tR=function(){return e},e}function tN(){let e=(0,e6._)(['\n
\n
\n ',"\n ",'\n
\n
\n ','\n
\n
\n
\n ']);return tN=function(){return e},e}function tB(){let e=(0,e6._)(['\n \n "]);return tB=function(){return e},e}function tU(){let e=(0,e6._)(['\n \n ']);return tU=function(){return e},e}function tj(){let e=(0,e6._)(['\n \n ']);return tj=function(){return e},e}function tz(){let e=(0,e6._)(['\n \n ']);return tz=function(){return e},e}function tq(){let e=(0,e6._)(['\n \n ']);return tq=function(){return e},e}function tH(){let e=(0,e6._)(['\n \n ']);return tH=function(){return e},e}function tV(){let e=(0,e6._)(['\n \n "]);return tV=function(){return e},e}function tW(){let e=(0,e6._)(['\n
\n \n ',"\n ","\n \n ","\n
\n "]);return tW=function(){return e},e}function tQ(){let e=(0,e6._)(['\n \n ']);return tQ=function(){return e},e}tL._thin=null,tL._auto=null;class tG extends eo{get style(){return"\n ."+this.cx.form+", ."+this.cx.formContainer+" {\n display: flex;\n gap: 24px;\n flex-direction: column;\n width: 100%;\n }\n\n ."+this.cx.formContainer+" {\n gap: 16px;\n }\n\n ."+this.cx.inputContainer+" {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n align-self: stretch;\n }\n\n ."+this.cx.inputContainerRow+" {\n display: contents;\n }\n\n ."+this.cx.inputContainerRow+":has(."+this.cx.input+'[type="checkbox"]) {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n gap: 8px;\n width: 100%;\n justify-content: flex-end;\n }\n\n .'+this.cx.inputLabel+" {\n color: #1B1B1B;\n font-family: inherit;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n }\n\n ."+this.cx.inputLabelOptional+" {\n color: #6E7879;\n font-weight: 400;\n }\n\n ."+this.cx.input+" {\n font-family: inherit;\n font-size: 14px;\n line-height: 22px;\n height: 40px;\n min-height: 40px;\n width: 100%;\n box-sizing: border-box;\n border: 1px solid #C8CED0ED;\n border-radius: 4px;\n padding: 8px 16px;\n color: #1B1B1B;\n font-weight: 400;\n background-color: white;\n }\n\n ."+this.cx.input+'[type="checkbox"] {\n height: 20px;\n width: 20px;\n }\n\n textarea.'+this.cx.input+" {\n resize: vertical;\n padding-top: 9px;\n overflow: hidden;\n }\n\n ."+this.cx.selectContainer+" {\n position: relative;\n width: 100%;\n height: 100%;\n cursor: pointer;\n }\n\n select."+this.cx.input+" {\n -webkit-appearance: none;\n appearance: none;\n }\n\n select."+this.cx.input+" + svg {\n position: absolute;\n right: 8px;\n top: calc(50% - 8px);\n fill: rgb(138, 147, 148);\n height: 16px;\n width: 16px;\n pointer-events: none;\n }\n\n ."+this.cx.input+'[aria-invalid="true"] {\n border-color: #E4251B;\n outline: 2px solid #E4251B;\n outline-offset: 2px;\n }\n\n .'+this.cx.errorMessageContainer+" {\n display: none;\n padding: 0px 4px;\n align-items: center;\n gap: 4px;\n align-self: stretch;\n border-radius: 4px;\n background: #FCEDEC;\n\n & svg {\n width: 16px;\n height: 16px;\n fill: #E4251B;\n }\n }\n\n ."+this.cx.inputContainer+":has(."+this.cx.input+'[aria-invalid="true"]) .'+this.cx.errorMessageContainer+" {\n display: flex;\n }\n\n ."+this.cx.errorMessage+" {\n color: #E4251B;\n font-family: inherit;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n }\n\n "+this.cssOverride("form")+"\n "+this.cssOverride("formContainer")+"\n "+this.cssOverride("inputContainer")+"\n "+this.cssOverride("inputLabel")+"\n "+this.cssOverride("input")+"\n "}get content(){return this.html(tR(),z(this.props.id),this.cx.form,this.cx.formContainer,this.fields)}get fields(){return this.props.inputFields.map(e=>{let t=this.getField(e);return this.html(tN(),this.cx.inputContainer,this.cx.inputContainerRow,this.getHTMLFieldLabel(t),this.getHTMLField(t),this.cx.errorMessageContainer,tk,this.cx.errorMessage)})}getHTMLFieldLabel(e){let t="";return"boolean"===e.type&&e.mustCheck?t=' (required)':e.optional&&(t=' (optional)'),this.html(tB(),this.cx.inputLabel,this.getFieldId(e),e.label,t)}setErrors(e,t){for(let i of this.getAllInputs(e)){let e=t[i.name],n=i.closest("."+this.cx.inputContainer),r=null==n?void 0:n.querySelector("."+this.cx.errorMessage);e?(i.setAttribute("aria-invalid","true"),null==n||n.classList.add(this.cx.hasError),r&&(r.textContent=this.getErrorMessage(e))):(i.removeAttribute("aria-invalid"),null==n||n.classList.remove(this.cx.hasError),r&&(r.textContent=""))}}getHTMLField(e){switch(e.type){case"string":case"company":case"name":return this.getTextField(e);case"decimal":return this.getNumberField(e);case"boolean":return this.getCheckboxField(e);case"phone":return this.getPhoneField(e);case"text":return this.getTextareaField(e);case"picklist":return this.getPicklistField(e);case"email":return this.getEmailField(e)}}getField(e){if("email"===e.type)return e;let t=this.inputFieldsOverridesMap.get(e.fieldId);if(!t)return e;let i=(0,L._)({},e);return t.placeholder&&(i.placeholder=t.placeholder),t.label&&(i.label=t.label),i}getTextField(e){return this.html(tU(),this.getFieldId(e),this.cx.input,e.name,e.placeholder)}getNumberField(e){return this.html(tj(),this.getFieldId(e),this.cx.input,e.name,e.placeholder)}getCheckboxField(e){return this.html(tz(),this.getFieldId(e),this.cx.input,e.name)}getPhoneField(e){return this.html(tq(),this.getFieldId(e),this.cx.input,e.name,e.placeholder)}getTextareaField(e){return this.html(tH(),this.getFieldId(e),this.cx.input,e.name,e.placeholder)}getPicklistField(e){var t;return this.html(tW(),this.cx.selectContainer,this.getFieldId(e),this.cx.input,e.name,e.placeholder?'":"",null==(t=e.fieldValues)?void 0:t.map(e=>this.html(tV(),e.value,e.label)),'\n \n \n \n')}getEmailField(e){var t;return this.html(tQ(),this.getFieldId(e),this.cx.input,e.name,e.placeholder,null!=(t=e.value)?t:"")}getAllInputs(e){return e.querySelectorAll("input, select, textarea")}getErrorMessage(e){if(e.message)return e.message;switch(e.type){case"empty":case"must_check":return"This field is required";case"not_full_name":return"Please enter your full name";default:return"This field is invalid"}}getFieldId(e){return"email"===e.type?"qualified-form-"+this.instanceId+"-field-email":"qualified-form-"+this.instanceId+"-field-"+e.fieldId}cssOverride(e){var t;return(null==(t=this.props.css)?void 0:t[e])?"."+this.cx[e]+" { "+this.props.css[e]+" }":""}constructor(e){var t;super((0,L._)({},e),null),this.displayName="MultiFieldForm",this.instanceId=tG.staticId++,this.inputFieldsOverridesMap=new Map(null==(t=e.inputFieldsOverrides)?void 0:t.map(e=>[e.referenceId,e]))}}function t$(){let e=(0,e6._)(['\n \n
\n ',"\n ",'\n
\n ','\n
\n ',"\n ","\n
\n ","\n ","\n
\n ","\n ","\n
\n ","\n \n "]);return t$=function(){return e},e}function tK(){let e=(0,e6._)(['\n
\n ',"\n
\n "]);return tK=function(){return e},e}function tY(){let e=(0,e6._)(['\n
\n \n
\n ','\n
\n ',"\n
\n
\n
\n "]);return tY=function(){return e},e}function tJ(){let e=(0,e6._)(['\n \n "]);return tJ=function(){return e},e}tG.staticId=0;class tX extends el{get style(){var e,t,i,n;let{variation:r}=this.props;return"\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n background: "+(null!=(e=r.headlineStyle.backgroundColor)?e:"#FFF")+";\n margin: 0;\n overflow: hidden;\n box-shadow: 0px 2px 8px 1px #00000033;\n p {\n margin: 0;\n }\n max-width: 90vw;\n max-height: 90dvh;\n }\n\n .content-container {\n display: flex;\n width: "+I[this.device][this.location]+"px;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: "+O[this.device][this.location]+";\n gap: 24px;\n box-sizing: border-box;\n align-self: center;\n height: 100%;\n max-height: 90dvh;\n }\n\n .image-container {\n width: 100%;\n height: 100%;\n max-height: 90dvh;\n max-width: 90vw;\n display: flex;\n flex-direction: "+(this.foregroundImage.isPlacementHorizontal?"row":"column")+";\n align-items: stretch;\n }\n\n .scrollable-section {\n display: flex;\n flex-direction: column;\n gap: 24px;\n flex: 1;\n box-sizing: content-box;\n scrollbar-width: thin;\n scrollbar-gutter: stable;\n overflow-y: auto;\n margin: -4px -8px -4px -4px;\n padding: 4px 8px 4px 4px;\n width: calc(100% + "+tL.thin+");\n }\n\n .background-image-wrapper {\n "+(this.backgroundImageUrl?"\n background-image: url("+this.backgroundImageUrl+");\n background-size: cover;\n background-position: center;\n display: flex;\n align-items: center;\n ":"")+"\n }\n\n .end-icon {\n position: relative;\n }\n\n .end-icon-check {\n position: absolute;\n left: 14px;\n top: 14px;\n }\n\n .form {\n display: flex;\n gap: 8px;\n flex-direction: column;\n width: 100%;\n }\n\n ."+this.cx.input+" {\n font-family: "+(null!=(t=r.headlineStyle.fontFamily)?t:"inherit")+';\n font-size: 14px;\n height: 40px;\n width: 100%;\n box-sizing: border-box;\n border: 1px solid #C8CED0ED;\n border-radius: 4px;\n padding: 8px 16px;\n color: #1B1B1B;\n font-weight: 400;\n background-color: white;\n\n &:is(:focus, :focus-visible):not(&[readonly]):not(&[aria-invalid="true"]) {\n border-color: '+(r.buttonStyle.backgroundColor||r.bodyStyle.color)+";\n outline: 2px solid "+(r.buttonStyle.backgroundColor||r.bodyStyle.color)+";\n outline-offset: 2px;\n }\n }\n\n ."+this.cx.input+'[aria-invalid="true"] {\n border-color: #E4251B;\n outline: 2px solid #E4251B;\n }\n\n .'+this.cx.inputErrorContainer+" {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n align-self: stretch;\n }\n\n ."+this.cx.errorMessageContainer+" {\n display: flex;\n padding: 0px 4px;\n align-items: center;\n gap: 4px;\n align-self: stretch;\n border-radius: 4px;\n background: #FCEDEC;\n\n & svg {\n width: 16px;\n height: 16px;\n fill: #E4251B;\n }\n }\n\n ."+this.cx.errorMessage+" {\n color: #E4251B;\n font-family: "+(null!=(i=r.headlineStyle.fontFamily)?i:"inherit")+";\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n }\n\n .privacy-disclosure-text {\n color: "+this.privacyDisclosureTextColor+";\n font-family: "+(null!=(n=r.headlineStyle.fontFamily)?n:"inherit")+";\n font-size: 12px;\n line-height: 18px;\n text-align: left;\n }\n\n .privacy-disclosure-text a {\n /* Prevent links from using the browser's default blue color */\n color: inherit;\n /* Ensure links are underlined to clearly indicate they are click-able */\n text-decoration: underline;\n }\n "}get content(){return this.html(t$(),this.foregroundImage.prependedContent,this.backgroundImageUrl?'
':"",this.headline,this.body,this.form,this.submitButton,this.privacyDisclosureText,this.backgroundImageUrl?"
":"",this.foregroundImage.appendedContent,this.dismissButton)}get headlineText(){var e,t;switch(this.state.current){case"emailCapture":return this.props.variation.headlineText;case"followupQuestions":return(null==(e=this.props.variation.followUpStepOverrides)?void 0:e.title)||"We need some more info.";case"end":return(null==(t=this.props.variation.thankYouStepOverrides)?void 0:t.title)||"Thank you!"}}get headlineStyle(){var e,t,i,n;switch(this.state.current){case"followupQuestions":return null!=(t=null==(e=this.props.variation.followUpStepOverrides)?void 0:e.titleStyle)?t:this.props.variation.headlineStyle;case"end":return null!=(n=null==(i=this.props.variation.thankYouStepOverrides)?void 0:i.titleStyle)?n:this.props.variation.headlineStyle;default:return this.props.variation.headlineStyle}}get headline(){let e=this.location===_?"sidebar-modal":"modal";return new tp((0,L._)({},this.headlineStyle,{text:this.headlineText,type:e,offerId:this.id}),this.hasOffersFontEnhancements)}get bodyText(){var e,t;switch(this.state.current){case"emailCapture":return this.props.variation.bodyText;case"followupQuestions":return(null==(e=this.props.variation.followUpStepOverrides)?void 0:e.description)||"Please provide the following information";case"end":return(null==(t=this.props.variation.thankYouStepOverrides)?void 0:t.description)||"We appreciate you taking the time to complete this form."}}get bodyStyle(){var e,t,i,n;switch(this.state.current){case"followupQuestions":return null!=(t=null==(e=this.props.variation.followUpStepOverrides)?void 0:e.descriptionStyle)?t:this.props.variation.bodyStyle;case"end":return null!=(n=null==(i=this.props.variation.thankYouStepOverrides)?void 0:i.descriptionStyle)?n:this.props.variation.bodyStyle;default:return this.props.variation.bodyStyle}}get body(){return new tv((0,L._)({},this.bodyStyle,{text:this.bodyText,allowScroll:!1}))}get form(){return"followupQuestions"===this.state.current?this.multiFieldForm:this.html(tK(),z(this.id),this.emailInput)}get buttonText(){var e,t,i;if(this.state.loading)return(0,tS.Cw)(null!=(e=this.props.variation.buttonStyle.color)?e:"#FFF",11);switch(this.state.current){case"emailCapture":return this.props.variation.buttonText;case"followupQuestions":return(null==(t=this.props.variation.followUpStepOverrides)?void 0:t.buttonText)||"Submit";case"end":return(null==(i=this.props.variation.thankYouStepOverrides)?void 0:i.buttonText)||"Close"}}get buttonStyle(){var e,t,i,n;switch(this.state.current){case"followupQuestions":return null!=(t=null==(e=this.props.variation.followUpStepOverrides)?void 0:e.buttonStyle)?t:this.props.variation.buttonStyle;case"end":return null!=(n=null==(i=this.props.variation.thankYouStepOverrides)?void 0:i.buttonStyle)?n:this.props.variation.buttonStyle;default:return this.props.variation.buttonStyle}}get submitButton(){return new tn((0,L._)({},this.buttonStyle,{id:this.id,type:"modal-submit",text:this.buttonText,focusRingColor:this.headlineStyle.color,formId:z(this.id)}),this.hasOffersFontEnhancements)}get dismissButton(){var e,t,i;if(!this.props.allowDismiss)return null;let{headlineStyle:n,buttonStyle:r}=this.props.variation;return new ts({id:this.id,isModal:!0,color:null!=(e=this.props.variation.headlineStyle.color)?e:"#1B1B1B",focusRingColor:null!=(t=null==n?void 0:n.color)?t:null,borderRadius:null!=(i=null==r?void 0:r.borderRadius)?i:"0px",hasDismissButtonAccessibilityEnabled:this.hasDismissButtonAccessibilityEnabled})}get location(){return this.props.location}get emailInput(){var e,t,i,n;return"end"===this.state.current?null:"emailCapture"===this.state.current&&this.state.error?this.html(tY(),this.cx.inputErrorContainer,this.cx.input,null!=(i=null==(t=this.props.variation.emailField)?void 0:t.placeholder)?i:"name@business.com",this.state.email&&"value="+this.state.email,this.cx.errorMessageContainer,tk,this.cx.errorMessage,this.state.error):this.html(tJ(),this.cx.input,null!=(n=null==(e=this.props.variation.emailField)?void 0:e.placeholder)?n:"name@business.com",this.state.email&&"value="+this.state.email)}get privacyDisclosureText(){return this.props.privacyDisclosureText&&"emailCapture"===this.state.current?'\n \n '+this.props.privacyDisclosureText+"\n \n ":null}setState(e,t){var i,n,r,s;let{animate:o=!1}=void 0===t?{}:t;if("end"===e.current&&(this.multiFieldForm=null),"followupQuestions"!==e.current)return super.setState(e,{animate:o});if(e.form&&(this.state=e,this.multiFieldForm=this.createMultiFieldForm(e.form),super.setState(e,{animate:o})),e.errors){let t=null==(n=this.root.shadowRoot)?void 0:n.querySelector("form");t&&this.multiFieldForm&&this.multiFieldForm.setErrors(t,null!=(r=e.errors)?r:{})}e.loading&&(null==(i=this.elements)?void 0:i.ctaButton)&&(this.elements.ctaButton.innerHTML=(0,tS.Cw)(null!=(s=this.props.variation.buttonStyle.color)?s:"#FFF",11))}createMultiFieldForm(e){var t,i;return new tG({id:this.id,inputFields:e.inputFields,inputFieldsOverrides:null!=(i=null==(t=this.props.variation.followUpStepOverrides)?void 0:t.additionalFields)?i:[],css:{inputLabel:"\n "+(this.props.variation.bodyStyle.fontFamily?"font-family: "+this.props.variation.bodyStyle.fontFamily+";":"")+"\n "+(this.props.variation.bodyStyle.color?"color: "+this.props.variation.bodyStyle.color+";":"")+"\n ",input:'\n &:is(:focus, :focus-visible):not(&[readonly]):not(&[aria-invalid="true"]) {\n border-color: '+(this.props.variation.buttonStyle.backgroundColor||this.props.variation.headlineStyle.color)+";\n outline: 2px solid "+(this.props.variation.buttonStyle.backgroundColor||this.props.variation.headlineStyle.color)+";\n outline-offset: 2px;\n }\n "}})}get privacyDisclosureTextColor(){var e;return"#"+((null==(e=this.props.variation.headlineStyle.color)?void 0:e.replace(/^#/,""))||"000000")+Math.round(191.25).toString(16).toUpperCase()}constructor(...e){super(...e),this.displayName="FormModal",this.type=u.HeadlineBodyForm,this.foregroundImage=new t_({location:this.location,foregroundImageConfig:this.props.foregroundImageConfig,foregroundImageUrl:this.props.foregroundImageUrl}),this.multiFieldForm=null}}function tZ(){let e=(0,e6._)(['\n \n ',"\n ","\n ","\n ","\n \n "]);return tZ=function(){return e},e}tX=(0,n.Cg)([e9],tX);class t0 extends ea{get style(){var e,t;let{variation:i}=this.props,n="";return this.isMobile&&(n="\n .container {\n padding: 20px 32px;\n\n .headline.banner.link {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: space-between;\n max-width: 100%;\n text-align: left;\n padding: 0;\n\n p {\n margin-right: 4px;\n max-width: 100%;\n }\n\n a {\n margin-right: auto;\n }\n }\n }\n\n "),"\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n gap: 32px;\n align-items: center;\n background: "+(null!=(e=i.headlineStyle.backgroundColor)?e:"#000")+";\n box-shadow: 0px -1px 28px 0px rgba(0, 0, 0, 0.00);\n margin: 0;\n padding: 0 36px;\n height: auto;\n max-height: "+D+";\n\n p {\n margin: 0;\n }\n }\n\n .background-image-wrapper {\n "+(this.backgroundImageUrl?"\n background-image: url("+this.backgroundImageUrl+");\n background-position: center;\n background-size: cover;\n ":"")+"\n }\n\n .banner {\n text-align: left;\n }\n\n .banner-link{\n "+(this.hasDismissButtonAccessibilityEnabled&&"\n &:is(:focus, :focus-visible) {\n outline: 2px solid "+(null!=(t=i.headlineStyle.color)?t:"black")+";\n outline-offset: 2px;\n }\n ")+"\n }\n\n .headline.banner.link {\n display: flex;\n gap: 12px;\n align-items: center;\n justify-content: center;\n padding: "+(this.hasDismissButtonAccessibilityEnabled?"14px 4px":"14px 0")+";\n }\n "+n}get content(){return this.html(tZ(),this.backgroundImageUrl?"background-image-wrapper":"",this.foregroundImage.prependedContent,this.headline,this.dismissButton,this.foregroundImage.appendedContent)}get cta(){let{buttonStyle:e,buttonText:t,buttonUrl:i,assetDeliveryType:n,headlineStyle:r}=this.props.variation;return new tn((0,L._)({},e,{id:this.id,text:t,href:i,deliveryType:n,type:"banner-link",color:r.color}),this.hasOffersFontEnhancements)}get headline(){let{headlineStyle:e,headlineText:t}=this.props.variation;return new tp((0,L._)({},e,{text:t,type:"banner-link",link:this.cta}),this.hasOffersFontEnhancements)}get dismissButton(){var e,t;if(!this.props.allowDismiss)return null;let{headlineStyle:i,buttonStyle:n}=this.props.variation;return new ts({id:this.id,color:this.props.variation.headlineStyle.color,focusRingColor:null!=(e=null==i?void 0:i.color)?e:null,borderRadius:null!=(t=null==n?void 0:n.borderRadius)?t:"0px",hasDismissButtonAccessibilityEnabled:this.hasDismissButtonAccessibilityEnabled})}get location(){return this.props.location}constructor(e,t,i,n){super(e,null,t,i,n),this.displayName="LinkBanner",this.type=u.HeadlineLink,this.ctaType="LINK",this.foregroundImage=new tl({location:this.location,foregroundImageConfig:this.props.foregroundImageConfig,foregroundImageUrl:this.props.foregroundImageUrl})}}t0=(0,n.Cg)([e9,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",["undefined"==typeof LinkBannerProps?Object:LinkBannerProps,"undefined"==typeof HTMLElement?Object:HTMLElement,Boolean,Boolean])],t0);class t1{insertContent(e,t,i){let{content:n,location:r,foregroundImageConfig:s,foregroundImageUrl:o,backgroundImageConfig:a,backgroundImageUrl:l,backgroundType:c}=t.currentVersion,u=e=>({id:t.id,variation:e,foregroundImageConfig:s,foregroundImageUrl:o,backgroundImageConfig:a,backgroundImageUrl:l,backgroundType:c,allowDismiss:n.dismissOptions.allowDismiss,location:r,privacyDisclosureText:t.privacyDisclosureText,formConfig:t.currentVersion.qualifiedFormConfig,privacyDisclosureId:t.privacyDisclosureId}),{variation:d}=n;if(J(d))return tf.withState(i)(u(d),e,this.hasOffersFontEnhancements,this.hasDismissButtonAccessibilityEnabled);if(Z(d))return t0.withState(i)(u(d),e,this.hasOffersFontEnhancements,this.hasDismissButtonAccessibilityEnabled);if(X(d))return tD.withState(i)(u(d),e,this.hasOffersFontEnhancements,this.hasDismissButtonAccessibilityEnabled,this.hasOffersFormBannerMobileImprovements);if(ee(d))return tA.withState(i)(u(d),e,this.hasOffersFontEnhancements,this.hasDismissButtonAccessibilityEnabled);if(et(d))return tX.withState(i)(u(d),e,this.hasOffersFontEnhancements,this.hasDismissButtonAccessibilityEnabled);else throw Error("Unknown variation type: "+JSON.stringify(d))}constructor(e=!1,t=!1,i=!1){this.hasOffersFontEnhancements=e,this.hasDismissButtonAccessibilityEnabled=t,this.hasOffersFormBannerMobileImprovements=i}}var t2=i(2617);let t3="data-qualified-offer-body-overflow-style",t4="data-qualified-offer-body-height-style";class t5{createHost(e){return N('\n \n \n ')}insertHost(e){this.flags.hasOffersPopupWithScrollDisabler?this.insertHostNext(e):(document.body.appendChild(e),document.body.setAttribute(t3,document.body.style.overflow),document.body.setAttribute(t4,document.body.style.height),document.body.style.overflow="hidden",document.body.style.height="100dvh",e instanceof HTMLDialogElement&&e.showModal())}removeHost(e){var t,i;if(this.flags.hasOffersPopupWithScrollDisabler)return void this.removeHostNext(e);e.remove();let n=null!=(t=document.body.getAttribute(t3))?t:"";document.body.style.overflow=n;let r=null!=(i=document.body.getAttribute(t4))?i:"";document.body.style.height=r,document.body.removeAttribute(t3),document.body.removeAttribute(t4)}insertHostNext(e){document.body.appendChild(e),t2.q.disableScroll("offers",{overlayElement:e}),e instanceof HTMLDialogElement&&e.showModal()}removeHostNext(e){e.remove(),t2.q.restoreScroll("offers")}constructor(e={}){this.flags=e}}class t6{createHost(e){return N('\n \n ')}insertHost(e){document.body.appendChild(e)}removeHost(e){e.remove()}}class t9{createHost(e,t){let{locationOverride:i=e.currentVersion.location}=void 0===t?{}:t,n=this.getHandler(i).createHost(e.id);return this.addLocationAttribute(n,i)}insertHost(e){return this.getHandler(e).insertHost(e)}afterInsertAnimation(e){var t,i;return null==(t=(i=this.getHandler(e)).afterInsertAnimation)?void 0:t.call(i,e)}beforeRemoveAnimation(e){var t,i;return null==(t=(i=this.getHandler(e)).beforeRemoveAnimation)?void 0:t.call(i,e)}removeHost(e){return this.getHandler(e).removeHost(e)}addLocationAttribute(e,t){return e.setAttribute(S,t),e}getLocation(e){if("string"==typeof e)return e;if(!(e instanceof HTMLElement))return e.currentVersion.location;let t=e.getAttribute(S);if(!t)throw Error("Host does not have a location");return t}getHandler(e){let t=this.getLocation(e),i=this.LOCATIONS_HANDLERS.get(t);if(!i)throw Error("Unknown location: "+t);return i}constructor(e={}){this.flags=e,this.LOCATIONS_HANDLERS=new Map([[v,new eS],[b,new eJ],[y,new t5(this.flags)],[_,new t6]])}}class t8{async render(e,t){let{animate:i=!1,state:n}=void 0===t?{}:t,r=this.locationManager.createHost(e),s=this.contentManager.insertContent(r,e,n);if(this.locationManager.insertHost(r),i)try{await this.animationManager.getAnimator(r,e.currentVersion.location,e.currentVersion.content.animation).animate()}catch(t){this.debugLog("Error animating offer: "+t,{offerId:e.id,location:e.currentVersion.location,animation:e.currentVersion.content.animation.type})}return this.locationManager.afterInsertAnimation(r),s}update(e,t){let i=document.getElementById(U(e.id));if(i)return this.contentManager.insertContent(i,e,t)}async remove(e,t){let{animate:i=!1}=void 0===t?{}:t,n=document.getElementById(U(e.id));if(n){if(this.locationManager.beforeRemoveAnimation(n),i)try{await this.animationManager.getAnimator(n,e.currentVersion.location,e.currentVersion.content.animation).reverse()}catch(t){this.debugLog("Error animating offer: "+t,{offerId:e.id,location:e.currentVersion.location,animation:e.currentVersion.content.animation.type})}this.locationManager.removeHost(n)}}debugLog(e,t){void 0===t&&(t={}),(0,w.dI)("[Renderer] "+e,t)}constructor(e={}){this.offerFeatureFlags=e,this.locationManager=new t9(e),this.contentManager=new t1(e.hasOffersFontEnhancements,e.hasDismissButtonAccessibilityEnabled,e.hasOffersFormBannerMobileImprovements),this.animationManager=new e5}}class t7{static async waitUntilLocationReady(e){if(!this.isInitialized)throw Error("RenderingInitializer not initialized");this.locationInitializationMap[e]||(await this.initializeLocation(e),this.locationInitializationMap[e]=!0)}static init(e){let{offerFeatureFlags:t,offersHeaderConfig:i}=e;this.isInitialized||(this.offerFeatureFlags=t,this.offersHeaderConfig=i,ef.setup(new t8(t)),this.isInitialized=!0)}static async initializeLocation(e){switch(e){case b:await eJ.setup(this.offersHeaderConfig);break;case v:eS.setup();break;case y:case _:case g:break;default:(0,e_.d)(e)}}}t7.isInitialized=!1,t7.locationInitializationMap={[b]:!1,[v]:!1,[y]:!1,[_]:!1,[g]:!1};class ie{async trigger(e){await Promise.all(e.map(e=>this.triggerOffer(e)))}clear(){for(let e of this.taskHandles.values())e.cancel();this.taskHandles.clear()}async triggerOffer(e){let{trigger:t}=e.currentVersion.target;switch(t.type){case"AFTER_PAGE_LOAD":await this.handleAfterPageLoad(e,t);break;case"ON_EXIT_INTENT":await this.handleOnExitIntent(e);break;default:this.debugLog("Unknown trigger type",{offer:JSON.stringify(e)})}}async handleAfterPageLoad(e,t){let i=ey(()=>this.waitUntilLocationReady(e),()=>this.afterLoadPromise,()=>new Promise(e=>setTimeout(e,1e3*t.delay)),()=>this.context.manager.add(e));this.taskHandles.add(i),await i.run(),this.taskHandles.delete(i)}async handleOnExitIntent(e){let t=ey(()=>this.waitUntilLocationReady(e),()=>new Promise(e=>setTimeout(e,1e4)),()=>this.waitForExitIntent(),()=>this.context.manager.add(e));this.taskHandles.add(t),await t.run(),this.taskHandles.delete(t)}async waitUntilLocationReady(e){await t7.waitUntilLocationReady(e.currentVersion.location)}async waitForExitIntent(){this.mobile?await this.waitForMobileExitIntent():await this.waitForDesktopExitIntent()}async waitForDesktopExitIntent(){return new Promise(e=>{let t=i=>{i.clientY<0&&(e(),document.documentElement.removeEventListener("mouseleave",t))};document.documentElement.addEventListener("mouseleave",t)})}async waitForMobileExitIntent(){return new Promise(e=>{let t=()=>{"visible"!==document.visibilityState&&(e(),s())},i=0,n=0,r=()=>{i=window.scrollY,setTimeout(()=>{n=window.scrollY},100),n-i>160&&(e(),s())},s=()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("scroll",r)};document.addEventListener("visibilitychange",t),window.addEventListener("scroll",r)})}get mobile(){var e;let t;return t=!1,e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t}debugLog(e,t){(0,w.dI)("[offer-main-script] "+e,t)}constructor(e){this.context=e,this.taskHandles=new Set,this.afterLoadPromise=(0,eb.I_)(),this.context.manager.subscribe("beforeClear",()=>this.clear())}}class it extends s.A{get hasActiveForm(){return this.formManager.hasActiveOffer}pause(){this.context.manager.pause()}resume(){this.context.manager.resume()}get offerFeatureFlags(){return this._offerFeatureFlags||(this._offerFeatureFlags={hasOffersFontEnhancements:this.config.hasOffersFontEnhancements,disableQOfferInfo:this.config.disableQOfferInfo,hasOffersPopupWithScrollDisabler:this.config.hasOffersPopupWithScrollDisabler,hasWidgetFullScreenWithScrollDisabler:this.config.hasWidgetFullScreenWithScrollDisabler,hasDismissButtonAccessibilityEnabled:this.config.hasDismissButtonAccessibilityEnabled,hasOffersFormBannerMobileImprovements:this.config.hasOffersFormBannerMobileImprovements}),this._offerFeatureFlags}async init(e){let t=this.processOffers(e);if(this.context.manager.isPaused){this.pendingOffers=t;return}let i=this.offers.filter(e=>t.some(t=>t.id===e.id));await this.clearOffers({except:i}),this.offers=t,await this.triggerManager.trigger(this.offers.filter(e=>!i.some(t=>t.id===e.id)))}initPendingOffers(){this.pendingOffers&&(this.init(this.pendingOffers),this.pendingOffers=null)}async clearOffers(e){let{except:t}=e;await this.context.manager.clear({except:t}),this.offers=[...t]}processOffers(e){let t=[...e].sort((e,t)=>e.position-t.position),i=new Set;return t.filter(e=>!i.has(e.currentVersion.location)&&(i.add(e.currentVersion.location),!0))}constructor(e){super(e),this.offers=[],this.pendingOffers=null,this._offerFeatureFlags=null;const t=(0,r.tx)(ev,this.widget,{context:"Offers::OfferManager"});this.context=new em(this.pageViewActivityEmitter,this.dateProvider,this.channel,new t,()=>this.iframeManager);const i=(0,r.tx)(ie,this.widget,{context:"Offers::TriggerManager"}),n=(0,r.tx)(l,this.widget,{context:"Offers::ButtonManager"}),s=(0,r.tx)(eh,this.widget,{context:"Offers::FormManager"});this.triggerManager=new i(this.context),this.buttonManager=new n(this.context,this.offerFeatureFlags),this.formManager=new s(this.context),this.context.manager.subscribe("afterResume",()=>this.initPendingOffers()),t7.init({offerFeatureFlags:this.offerFeatureFlags,offersHeaderConfig:this.config.offersHeaderConfig}),this.channel.on("initOffers",e=>{this.offerScript.init(e).then(()=>{this.widget.widgetIdForInitOffers!==this.widget.widgetId&&(this.widget.logTiming("Offers load time","offers_time_to_init_ms"),this.widget.widgetIdForInitOffers=this.widget.widgetId)}).catch(()=>{})})}}(0,n.Cg)([(0,r.Hi)({context:"Offers::OfferMainScript#init"}),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",["undefined"==typeof Immutable?Object:Immutable]),(0,n.Sn)("design:returntype",Promise)],it.prototype,"init",null),(0,n.Cg)([(0,r.Hi)({context:"Offers::OfferMainScript#initPendingOffers"}),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[]),(0,n.Sn)("design:returntype",void 0)],it.prototype,"initPendingOffers",null),(0,n.Cg)([(0,r.Hi)({context:"Offers::OfferMainScript#clearOffers"}),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[Object]),(0,n.Sn)("design:returntype",Promise)],it.prototype,"clearOffers",null)},1941:function(e,t,i){"use strict";function n(e,t){let i=[];for(let n=0;nn})},359:function(e,t,i){"use strict";i.d(t,{T:()=>n}),i(8059);let n=e=>{if(window.Audio){let i=e=>{if(e instanceof DOMException);else throw e};try{var t;null==(t=new Audio(e).play())||t.catch(i)}catch(e){i(e)}}};window.speechSynthesis;let r=window.speechSynthesis,s=!1,o=()=>{if(null.length&&!s){let e,t=null.shift();t.onstart=()=>{e=every(1e4,()=>{r.resume()})};let i=_once(()=>{null==e||e(),r.cancel(),s=!1,null.length&&after(0,o)});t.onend=i,after(3e4,i),s=!0,r.speak(t)}}},3013:function(e,t,i){"use strict";i.d(t,{z:()=>n});let n=e=>function(){for(var t=arguments.length,i=Array(t),n=0;n=2&&("string"==typeof i[1]||"symbol"==typeof i[1])){let[t,n]=i,r=i[2];return r||(r={}),e(void 0,t,n,r)||r}let[r]=i;return(t,i,n)=>(n||(n={}),e(r,t,i,n)||n)}},3851:function(e,t,i){"use strict";var n,r;i.d(t,{EY:()=>h,FS:()=>s,I_:()=>o,n:()=>u,q2:()=>c,wt:()=>d}),(null==(n=document)?void 0:n.documentElement)||null==(r=document)||r.body;let s="isConnected"in Node.prototype?(e,t)=>(void 0===t&&(t=document),e.isConnected&&e.ownerDocument===t):(e,t)=>(void 0===t&&(t=document),e.ownerDocument===t&&!(t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_DISCONNECTED));function o(){return(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?Promise.resolve():new Promise(e=>{document.addEventListener("DOMContentLoaded",()=>e())})}let a=!1,l=!1;function c(e,t,i,n){let r,{capture:s=!1,passive:o=!1}=void 0===n?{}:n;return r=!function(){if(!a){let e={get passive(){return l=!0,!0}};try{window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){}a=!0}return l}()?s:{capture:s,passive:o},e.addEventListener(t,i,r),()=>{e.removeEventListener(t,i,r)}}function u(){var e;return(null==(e=document)?void 0:e.visibilityState)==="visible"}function d(e,t){var i;let{filterFn:n=()=>!0,filterOncePerShadowDom:r=!0,hasShadowDomSupport:s=!1,nestedTriggersSupport:o=!1}=void 0===t?{}:t,a="composedPath"in e?e.composedPath():[];if(!s||0===a.length||!(a[0].getRootNode()instanceof ShadowRoot)){let{target:t}=e;if(o)for(;t&&!(t instanceof Element);)t=t.parentNode;return n(t)?t:null}if(!r)return null!=(i=a.find(n))?i:null;let l=!0;for(let e of a){if(l&&n(e))return e;l=e instanceof ShadowRoot}return null}function h(e,t){return void 0===t&&(t={}),Object.assign(new e.constructor(e.type,e),t)}},9108:function(e,t,i){"use strict";i.d(t,{_F:()=>o,f8:()=>s});var n=i(680),r=i.n(n);function s(){try{return window.self!==window.top}catch(e){return!0}}function o(e,t,i){let n,s;if(void 0===i&&(i=!1),!t)return!1;try{let e=new URL(t);s=(s=(n=(n=e.host.toLowerCase()).startsWith("www.")&&i?n.slice(4):n)+e.pathname.toLocaleLowerCase()).endsWith("/")?s.slice(0,-1):s}catch(e){return!1}if(0===e.length)return!0;let o={};for(let[t,a]of(e.forEach(e=>{let t=e.split("."),i=[];t.forEach(e=>{"*"===e?i.push("(.*?)"):i.push(r()(e))}),o[e]=RegExp("^"+i.join("\\.")+"$")}),Object.entries(o))){let e=new URL("https://"+t);if(i&&"/"!==e.pathname){if(a.test(s))return!0}else if(a.test(n))return!0}return!1}},71:function(e,t,i){"use strict";function n(e,t){try{return localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){return!1}}function r(e){try{return JSON.parse(localStorage.getItem(e))}catch(e){return null}}i.d(t,{C6:()=>n,Fn:()=>s,LQ:()=>o,n9:()=>a,yw:()=>r});let s=n,o=r,a=function(e){try{return localStorage.removeItem(e),!0}catch(e){return!1}}},516:function(e,t,i){"use strict";i.d(t,{H:()=>a,j:()=>o});var n=i(5023),r=i(67),s=i(1941);function o(e){var t;return t=(0,r._)("_disposerQueue"),class extends e{cleanup(){}dispose(){if(!this.isDisposed){this.isDisposed=!0;let e=(0,s.z)((0,n._)(this,t)[t],e=>e());if((0,n._)(this,t)[t]=[],null==this.cleanup||this.cleanup.call(this),super.dispose==null||super.dispose.call(this),e.length>0)throw Error("Dispose errors: "+e.join(", "))}}tryDispose(){try{this.dispose()}catch(e){}}callOnDispose(e){(0,n._)(this,t)[t].push(e)}constructor(...e){super(...e),Object.defineProperty(this,t,{writable:!0,value:void 0}),this.isDisposed=!1,(0,n._)(this,t)[t]=[]}}}function a(e,t,i){if(!i)return void Object.defineProperty(e,t,{configurable:!0,get(){var e=this;let i=Object.getOwnPropertyDescriptor(this,t),n=null==i?void 0:i.value;if("function"!=typeof n)return n;let r=function(){for(var t=arguments.length,i=Array(t),r=0;rr,_:()=>n});let r=(0,i(3013).z)((e,t,i,n)=>{let r=null!=e?e:i;return n.get=function(){return this.container.resolve(r)},n})},7050:function(e,t,i){"use strict";function n(e,t){var i,n,r,s;let o;e&&("string"==typeof t.textContent&&(i=e,n=t.textContent,o=!1,!function e(t){var i;t.nodeType===Node.TEXT_NODE&&(null==(i=t.textContent)?void 0:i.trim())&&!o?(t.textContent=n,o=!0):t.nodeType===Node.TEXT_NODE?t.textContent="":t.childNodes.forEach(e)}(i),o||(i.textContent=n)),r=e,s=t,!function e(t){t instanceof HTMLElement&&("string"==typeof s.backgroundColor&&t.style.setProperty("background-color",s.backgroundColor,"important"),"string"==typeof s.textColor&&t.style.setProperty("color",s.textColor,"important"),t.childNodes.forEach(e))}(r),"string"==typeof s.borderColor&&r instanceof HTMLElement&&r.style.setProperty("border-color",s.borderColor,"important"))}i.d(t,{Cw:()=>s,Db:()=>n,Vw:()=>a,lc:()=>o});let r="q-intermediate-loading-template",s=(e,t)=>{let i=Math.floor(t*Math.PI*2),n=Math.floor(.75*i),r=3*i;return'\n \n \n \n \n \n \n \n \n '};function o(e,t){switch(t){case"hidden":e instanceof HTMLElement&&(e.style.visibility="hidden");break;case"ellipsis":e.textContent="...";break;case"spinner":!function(e){if(e instanceof HTMLElement){let{position:t}=getComputedStyle(e),{offsetHeight:i,offsetWidth:n}=e,{color:o,fontSize:l}=getComputedStyle(a(e)||e),c=Math.floor(Number(l.replace("px",""))/2),u=n/2-c,d=i/2-c,h=!1;e.childNodes.forEach(e=>{e instanceof HTMLElement?e.style.opacity="0":h=!0}),h&&(e.style.color="rgba(0, 0, 0, 0)"),"static"===t&&(e.style.position="relative");let p=document.createElement("template");p.setAttribute("id",r),p.innerHTML=s(o,c);let m=document.createElement("div");m.id=r,m.style.position="absolute",m.style.lineHeight="0",m.style.top=""+d+"px",m.style.left=""+u+"px",e.appendChild(m),m.attachShadow({mode:"open"}).appendChild(p.content)}}(e);break;case"icon":!function(e){var t,i;let{color:n,fontSize:s,width:o,height:a}=getComputedStyle(e);e instanceof HTMLElement&&(e.style.minWidth=o,e.style.minHeight=a),e.innerHTML="";let l=document.createElement("template");l.setAttribute("id",r),void 0===(t=n)&&(t="white"),void 0===(i=s)&&(i="14px"),l.innerHTML='\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n';let c=document.createElement("div");e.appendChild(c),c.attachShadow({mode:"open"}).appendChild(l.content)}(e)}}function a(e){let t=0,i=null;return!function e(n){if(n.nodeType===Node.TEXT_NODE){var r,s;let e=null!=(s=null==(r=n.textContent)?void 0:r.trim().length)?s:0;e>t&&(t=e,i=n.parentNode)}else for(let t of n.childNodes)e(t)}(e),i}},5825:function(e,t,i){"use strict";var n,r;i.d(t,{XY:()=>s,dI:()=>p,Nz:()=>d,Bb:()=>h,ko:()=>c,Z$:()=>l,U3:()=>m,cR:()=>u}),(r=n||(n={}))[r.All=0]="All",r[r.Two=1]="Two",r[r.One=2]="One";let s="a, button, .btn, [role=button], input[type=button], input[type=submit]",o=/\[href="([^"]+)"\]/,a=/a:contains\("([^"]+)"\)/,l=e=>{var t;return null==(t=e.match(a))?void 0:t[1]},c=e=>{var t;return null==(t=e.match(o))?void 0:t[1]},u=e=>e.sort((e,t)=>e.scopePrecedence{var i,n,r;let s=l(t);return s?(null==(r=e.textContent)||null==(n=r.trim())||null==(i=n.toLowerCase())?void 0:i.replaceAll(/\xA0/g," "))===s.toLowerCase():e.matches(t+", "+t+" *")},h=()=>new URLSearchParams(document.location.search).has("q_debug"),p=(e,t)=>{void 0===t&&(t={});try{if(h()){let i=Object.keys(t).length>0?"["+Object.entries(t).map(e=>{let[t,i]=e;return t+"="+i}).join(" ")+"] ":"";console.log(""+i+e)}}catch(e){console.error(e)}};function m(e){return e.matches(":is(qualified-form, [data-qualified-offer-host-location], #qualified-multimodal-host) *")}},4796:function(e,t,i){"use strict";function n(e){return btoa(unescape(encodeURIComponent(e)))}function r(e){return decodeURIComponent(escape(atob(e)))}i.d(t,{Ey:()=>r,nk:()=>n}),i(2404)},759:function(e,t,i){"use strict";i.d(t,{Pl:()=>o,Si:()=>s,cb:()=>r});let n=()=>{};function r(e){return new Promise(t=>setTimeout(t,e))}function s(e,t){if(!t)return n;{let i=()=>{i.intervalID&&(clearInterval(i.intervalID),i.intervalID=null)};return i.intervalID=window.setInterval(t,e),i}}function o(e,t){if(!t)return n;{let i=()=>{i.timeoutID&&(clearTimeout(i.timeoutID),i.timeoutID=null)};return i.timeoutID=window.setTimeout(t,e),i}}},6408:function(e,t,i){"use strict";function n(e,t){return e.includes(t)}function r(e){try{return e()}catch(e){return}}i.d(t,{EE:()=>function e(t){return Array.isArray(t)?t.map(e):t&&"object"==typeof t?Object.fromEntries(Object.entries(t).map(t=>{let[i,n]=t;return[i.replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase(),e(n)]})):t},S1:()=>n,_p:()=>r})},2510:function(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>d});var n=i(5671);let r=class{trackEvent(e){null==window.fbq||window.fbq.call(window,"trackCustom",e)}};class s{trackEvent(e,t){var i;null==(i=this.tracker)||i._trackEvent(e,t)}constructor(e){e?this.tracker=window._gat._getTracker(e):this.tracker=window.pageTracker}}class o{trackEvent(e,t){let i={event_category:e};this.propertyId&&(i.send_to=this.propertyId),null==window.gtag||window.gtag.call(window,"event",t,i)}constructor(e){this.propertyId=e}}class a{trackEvent(e,t){this.initialized.then(()=>{var i;null==(i=this.tracker)||i.send("event",e,t)})}constructor(e){this.initialized=new Promise(t=>{window.ga(()=>{var i,n;e?(null==window.ga||window.ga.call(window,"create",e,"auto","_qualifiedTracker"),this.tracker=null==(i=window.ga)?void 0:i.getByName("_qualifiedTracker")):this.tracker=null==(n=window.ga)?void 0:n.getAll()[0],t()})})}}let l=class{trackEvent(e){var t;null==(t=this.tracker)||t.trackEvent("Qualified Chat",e)}constructor(e){try{window._gat?this.tracker=new s(e):window.ga?this.tracker=new a(e):window.gtag&&(this.tracker=new o(e))}catch(e){console.warn("Qualified: Error initializing Google Analytics",e)}}},c=class{trackEvent(e){var t;null==(t=window.dataLayer)||t.push({action:e,category:"Qualified Chat",event:"ga_event"})}};class u extends n.A{init(){let e=[];this.config.analytics.googleAnalytics.trackEvents&&e.push(new l(this.config.analytics.googleAnalytics.propertyId)),this.config.analytics.googleTagManager.trackEvents&&e.push(new c),this.config.analytics.facebook.trackEvents&&e.push(new r),e.length&&this.channel.on("received",(t,i)=>{if("conversationEvent"===t&&"Message Captured"!==i.name)try{e.forEach(e=>e.trackEvent(i.name))}catch(e){console.warn("Qualified: Error sending tracking event",e)}})}}let d=u},9879:function(e,t,i){"use strict";i.d(t,{Hi:()=>s,tx:()=>o});var n=i(3013),r=i(7377);let s=(0,n.z)((e,t,i,n)=>{let s=n.value;return n.value=function(){let n;for(var o=arguments.length,a=Array(o),l=0;l{try{var o;if(!s)return;if(null==(o=(0,r.N)())||o.captureException(s),null==e?void 0:e.sendToServer){let r=(null==e?void 0:e.context)||t.constructor.name+"#"+i,o=function(e){if(!e)return{message:"Unknown error"};if("string"==typeof e)return{message:e};if(e instanceof Error)return{message:e.message,stack:e.stack};if(e&&"object"==typeof e)try{return{message:JSON.stringify(e)}}catch(e){}return{message:String(e)}}(s),a={context:r};"string"==typeof o.stack&&(a.stack=o.stack),n.serverLog({message:o.message,type:"both",extra:a})}}catch(e){console.warn("Qualified: An unexpected issue occurred in captureWidgetExceptions",e)}if((null==e?void 0:e.rethrow)!==!1)throw s});try{let e=s.apply(this,a);if(e&&"function"==typeof e.catch)return e.catch(c);return e}catch(e){c(e)}},n});function o(e,t,i){return void 0===i&&(i={}),class extends e{constructor(...n){super(...n),this.widget=t;try{Object.getOwnPropertyNames(e.prototype).forEach(e=>{if("constructor"!==e&&"function"==typeof this[e]){let t=this[e];this[e]=s(i)(this,e,{value:t}).value}})}catch(e){console.warn("Qualified: An unexpected issue occurred in withCaptureExceptions",e)}}}}},9706:function(e,t,i){"use strict";i.d(t,{Fg:()=>l,GB:()=>a,Yb:()=>o,aV:()=>s});var n=i(6408);let r=["lightbox_gather"],s=["lightbox_gather","calendar_event_offer","calendar_event_confirmation","text"].filter(e=>!(0,n.S1)(r,e)),o=["initQualifiedFormElementConversation","qualifiedFormEnd","qualifiedFormRedirect"],a=3e4,l=500},2504:function(e,t,i){"use strict";i.d(t,{O8:()=>y,R9:()=>b,Dj:()=>_,v4:()=>v,GJ:()=>g});var n,r,s,o,a=i(2550),l=i.n(a),c=i(7971),u=i(6408);let d=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`\{\|\}~\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)+$/,h=["aol.com","att.net","comcast.net","facebook.com","gmail.com","gmx.com","googlemail.com","hotmail.com","hotmail.co.uk","mac.com","me.com","mail.com","msn.com","live.com","sbcglobal.net","verizon.net","yahoo.com","yahoo.co.uk","email.com","fastmail.fm","games.com","gmx.net","hush.com","hushmail.com","icloud.com","iname.com","inbox.com","lavabit.com","love.com","outlook.com","pobox.com","protonmail.ch","protonmail.com","tutanota.de","tutanota.com","tutamail.com","tuta.io","keemail.me","rocketmail.com","safe-mail.net","wow.com","ygm.com","ymail.com","zoho.com","yandex.com","bellsouth.net","charter.net","cox.net","earthlink.net","juno.com","btinternet.com","virginmedia.com","blueyonder.co.uk","freeserve.co.uk","live.co.uk","ntlworld.com","o2.co.uk","orange.net","sky.com","talktalk.co.uk","tiscali.co.uk","virgin.net","wanadoo.co.uk","bt.com","sina.com","sina.cn","qq.com","naver.com","hanmail.net","daum.net","nate.com","yahoo.co.jp","yahoo.co.kr","yahoo.co.id","yahoo.co.in","yahoo.com.sg","yahoo.com.ph","163.com","yeah.net","126.com","21cn.com","aliyun.com","foxmail.com","hotmail.fr","live.fr","laposte.net","yahoo.fr","wanadoo.fr","orange.fr","gmx.fr","sfr.fr","neuf.fr","free.fr","gmx.de","hotmail.de","live.de","online.de","t-online.de","web.de","yahoo.de","libero.it","virgilio.it","hotmail.it","aol.it","tiscali.it","alice.it","live.it","yahoo.it","email.it","tin.it","poste.it","teletu.it","mail.ru","rambler.ru","yandex.ru","ya.ru","list.ru","hotmail.be","live.be","skynet.be","voo.be","tvcablenet.be","telenet.be","hotmail.com.ar","live.com.ar","yahoo.com.ar","fibertel.com.ar","speedy.com.ar","arnet.com.ar","yahoo.com.mx","live.com.mx","hotmail.es","hotmail.com.mx","prodigy.net.mx","yahoo.ca","hotmail.ca","bell.net","shaw.ca","sympatico.ca","rogers.com","yahoo.com.br","hotmail.com.br","outlook.com.br","uol.com.br","bol.com.br","terra.com.br","ig.com.br","itelefonica.com.br","r7.com","zipmail.com.br","globo.com","globomail.com","oi.com.br","mailinator.com","gmai.com","gmeil.com","none.com"];var p=i(9706);class m{wait(){return this.isWaiting||(this.isWaiting=!0,"custom-event-resolver"===this.options.type&&this.resolveUsingCustomResolver(),("basic-event-resolver"===this.options.type||"custom-event-resolver"===this.options.type)&&this.channel.on(this.options.event,this.listener),"timeout"===this.options.type&&(this.timeoutHandle=setTimeout(()=>this.resolveUsingTimeout(),this.options.timeout))),this.promise}waitDisposed(){return this.disposedPromise}waitDisposedOrResolved(){return Promise.race([this.wait(),this.waitDisposed()])}get isDisposed(){return this._isDisposed}get isResolved(){return this._isResolved}resolveUsingCustomResolver(e){this._isResolved||"custom-event-resolver"!==this.options.type||this.options.shouldResolve(e)&&this.options.resolver(this.resolve,this.dispose)}resolveUsingBasicResolver(e){this._isResolved||"basic-event-resolver"!==this.options.type||(this.resolve(this.options.resolver(e)),this.dispose())}resolveUsingTimeout(){this._isResolved||"timeout"!==this.options.type||(this.resolve(this.options.result),this.dispose())}constructor(e,t){this.channel=e,this.options=t,this._isResolved=!1,this._isDisposed=!1,this.timeoutHandle=null,this.isWaiting=!1,this.dispose=()=>{this._isDisposed||(("basic-event-resolver"===this.options.type||"custom-event-resolver"===this.options.type)&&this.channel.off(this.options.event,this.listener),this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=null),this._isDisposed=!0,this._resolveDisposed())},this.listener=e=>{"custom-event-resolver"===this.options.type?(this.options.onMessage(e,this.dispose),this.resolveUsingCustomResolver(e)):this.resolveUsingBasicResolver(e)},this.resolve=e=>{this._isResolved||(this._isResolved=!0,this._resolve(e))},this.promise=new Promise(e=>this._resolve=e),this.disposedPromise=new Promise(e=>this._resolveDisposed=e)}}class f{addActions(e){return this.actions.push(...e),this}async race(){let e=await Promise.race(this.actions.map(e=>e.wait()));return this.dispose(),e}dispose(){this.actions.forEach(e=>!e.isResolved&&e.dispose()),this.actions=[]}constructor(e=[]){this.actions=e}}var g=((n={}).OFFERS="offers",n.EMBEDDED="embedded",n),v=((r={}).INVALID="invalid",r.EMPTY="empty",r.NON_BUSINESS="non_business",r),b=((s={}).INVALID="invalid",s.EMPTY="empty",s.NOT_FULL_NAME="not_full_name",s.MUST_CHECK="must_check",s),y=((o={}).WIDGET="widget",o.REDIRECT="redirect",o.NONE="none",o);class _{async getFormConfig(){if("embedded"!==this.props.source)return Promise.reject();let{formApiName:e}=this.props;return new Promise((t,i)=>{let n=e=>{e.form_transaction_id===this.formTransactionId&&(this.props.channel.off("getQualifiedFormConfig",n),"qualified_form_config"in e?t({qualifiedFormConfig:{assetUrl:e.qualified_form_config.asset_url,emailField:{label:e.qualified_form_config.email_field.label,placeholder:e.qualified_form_config.email_field.placeholder},validateBusinessEmail:e.qualified_form_config.validate_business_email},success:!0}):t({error:e.error,success:!1}))};this.props.channel.on("getQualifiedFormConfig",n),this.props.channel.send({event:"getQualifiedFormConfig",payload:{bot_api_name:e,form_transaction_id:this.formTransactionId}})})}submitEmail(e){this.conversation=null,this.message=null;let{valid:t,reason:i}=this.validateEmail(e);return t?(this._submitEmail(e),{success:!0,result:this.waitForForm()}):{success:!1,error:i}}submitFollowUpQuestions(e){if(!this.message)throw Error("Cannot submit followup questions without an active conversation.");if(e.length!==this.message.inputFields.length)throw Error("Entries must match the number of input fields.");let t=this.validateEntries(e);if(Object.keys(t).length>0)return{success:!1,errors:t};let i={type:"field_entries",botStep:this.message.botStep,executionStep:[this.message.scriptId,this.message.botStep],entries:this.formatEntries(e),conversationId:this.message.conversationId};return this.props.iframeManager.sendMessage(i),{success:!0,action:new f(this.createEndActions()).race()}}validateEmail(e){if(!e||""===e.trim())return{valid:!1,reason:"empty"};if(!this.props.config)throw Error("Cannot submit email without a form config.");let[t,i]=((e,t=!1)=>{if(!d.test(e))return[!1,"invalid"];if(t){let t=e.split("@")[1];if(h.includes(t.toLowerCase()))return[!1,"personal"]}return[!0]})(e,this.props.config.validateBusinessEmail);return t?{valid:t}:"personal"===i?{valid:t,reason:"non_business"}:{valid:t,reason:"invalid"}}_submitEmail(e){"offers"===this.props.source&&this.props.channel.send({event:"submitQualifiedForm",payload:{email:e,offer_id:this.props.offerId,form_transaction_id:this.formTransactionId,source:this.props.source}}),"embedded"===this.props.source&&this.props.channel.send({event:"submitQualifiedForm",payload:{email:e,bot_api_name:this.props.formApiName,form_transaction_id:this.formTransactionId,source:this.props.source}})}waitForForm(){let e=new f(this.createEndActions("redirect")),t=(t,i)=>{this.message&&this.message.inputFields.length>0?(e.dispose(),t({form:{title:this.message.title,subtitle:this.message.subtitle,buttonText:this.message.buttonText,inputFields:this.message.inputFields},action:null})):t({form:null,action:e.addActions(this.createEndActions("widget","end","timeout")).race()}),i()},i=e=>{var t;e.formTransactionId===this.formTransactionId&&(this.conversation=e,this.message=null!=(t=e.messages.find(e=>"lightbox_gather"===e.type))?t:null)},n=this.createAction({type:"custom-event-resolver",event:"initQualifiedFormElementConversation",resolver:t,onMessage:i,shouldResolve:()=>!!this.conversation});return e.race(),n.wait()}createEndActions(){for(var e=arguments.length,t=Array(e),i=0;i({type:"none"})})}createRedirectAction(){return this.createAction({type:"basic-event-resolver",event:"qualifiedFormRedirect",resolver:e=>("embedded"===this.props.source&&(window.location.href=e.url),{type:"redirect",url:e.url})})}createWidgetAction(){let e=e=>(0,u.S1)(p.aV,e.type),t=()=>{this.props.channel.emit("received","initQualifiedFormElementConversation",this.conversation)},i=(e,t)=>{this.conversation&&e.conversationId===this.conversation.id?this.conversation.messages.push(e):t()};return this.createAction({type:"custom-event-resolver",event:"elementMessage",resolver:(e,i)=>{e({type:"widget"}),setTimeout(()=>{t(),i()},p.Fg)},onMessage:i,shouldResolve:()=>{var t,i;return!!(null==(i=this.conversation)||null==(t=i.messages)?void 0:t.find(e))}})}validateEntries(e){if(!this.message)throw Error("Cannot validate entries without an active conversation.");let t={};for(let[i,n]of e.entries()){let e=this.message.inputFields[i],{valid:r,error:s}=this.validateEntry(n,e);r||(t[e.name]=s)}return t}validateEntry(e,t){var i,n;if(!e||""===e.trim())return t.optional?{valid:!0}:{valid:!1,error:{type:"empty"}};if("name"===t.type&&t.validateFullName&&!function(e){let t=(0,c.default)(e);if(!t.includes(null))return!0;let i=t[0];if(null!==i&&(i.trim().split(/(\s+)/).length>1||-1!==e.search(/,? +(i{1,3}|iv|vi{0,3}|s(enio)?r|j(unio)?r|phd|apr|rph|pe|md|ma|dmd|cme)$/i)))return!0;return!1}(e))return{valid:!1,error:{type:"not_full_name"}};if("boolean"===t.type){if("true"!==e&&"false"!==e)return{valid:!1,error:{type:"invalid"}};if(t.mustCheck&&"true"!==e)return{valid:!1,error:{type:"must_check"}}}return"decimal"===t.type&&Number.isNaN(parseFloat(e))||"phone"===t.type&&!function(e){if(!e||"string"!=typeof e||0===(e=e.replace(/\s+/g,"")).length||/[^\d\s+().-]/.test(e)||e.includes("++")||e.includes("+0")||e.includes("+-")||e.includes("+00")||(e.match(/\+/g)||[]).length>1||e.includes("00+")||e.includes("+")&&!e.startsWith("+"))return!1;let t=e.replace(/[^0-9+]/g,"").replace(/^00/g,"+");return/^(?:\+\d{8,15}|\d{8,15})$/.test(t)}(e)||"picklist"===t.type&&!(null==(n=t.fieldValues)?void 0:n.some(t=>t.value===e))?{valid:!1,error:{type:"invalid"}}:"string"===t.type&&(null==(i=t.validation)?void 0:i.regex)&&!new RegExp(t.validation.regex,t.validation.caseSensitive?"g":"gi").test(e)?{valid:!1,error:{type:"invalid",message:t.validation.error}}:{valid:!0}}formatEntries(e){if(!this.message)throw Error("Cannot validate entries without an active conversation.");return e.map((e,t)=>this.formatEntry(e,this.message.inputFields[t]))}formatEntry(e,t){return"phone"===t.type?e.trim().replace(/[^0-9+]/g,"").replace(/^00/g,"+"):e}createAction(e){return new m(this.props.channel,e)}constructor(e){this.props=e,this.conversation=null,this.message=null,this.formTransactionId=l()()}}},2617:function(e,t,i){"use strict";i.d(t,{q:()=>n});class n{static get locks(){var e;return null!=(e=this._locks)?e:this._locks=new Set}static get scrollTarget(){var e;return null!=(e=this._scrollTarget)?e:this._scrollTarget=this.getScrollTarget()}static get observers(){var e;return null!=(e=this._observers)?e:this._observers=new Map}static disableScroll(e,t){this.locks.has(e)||(this.locks.add(e),t&&this.watch(e,t),this.locks.size>1||this.makePageUnscrollable())}static restoreScroll(e){!this.locks.has(e)||(this.locks.delete(e),this.unwatch(e),this.locks.size>0||(this.restorePageScrollability(),this.scrollTargetOverflow=null))}static watch(e,t){let{overlayElement:i}=t;if(this.observers.has(e))return;let n=()=>{this.restoreScroll(e),this.unwatch(e)},r=new MutationObserver(()=>{i.isConnected||n()});i.parentElement&&r.observe(i.parentElement,{childList:!0});let s=e=>{i.contains(e.target)||n()};document.body.addEventListener("click",s),this.observers.set(e,()=>{document.body.removeEventListener("click",s),r.disconnect()})}static unwatch(e){var t;this.observers.has(e)&&(null==(t=this.observers.get(e))||t(),this.observers.delete(e))}static makePageUnscrollable(){this.scrollTargetOverflow=this.getOverflow(this.scrollTarget),this.setOverflow(this.scrollTarget,this.getOverflowProperty())}static restorePageScrollability(){this.scrollTargetOverflow&&(this.setOverflow(this.scrollTarget,this.scrollTargetOverflow),this.scrollTargetOverflow=null)}static setOverflow(e,t){e.style.setProperty("overflow",t.value,t.priority)}static getOverflow(e){return{value:e.style.getPropertyValue("overflow"),priority:e.style.getPropertyPriority("overflow")}}static getScrollTarget(){return document.body.clientHeightF});var n=i(9108),r=i(866),s=i.n(r),o=i(3916),a=i.n(o);let l={":hover":".__q__hover",":focus-within":".__q__focus_within",":focus-visible":".__q__focus_visible",":focus":".__q__focus",":active":".__q__active"},c=e=>a()(s()(e),e=>Number.parseInt(e,10)),u=c(["http://www.w3.org/1999/xhtml","http://www.w3.org/2000/svg","http://www.w3.org/1999/xlink","http://www.w3.org/1998/Math/MathML"]),d=c([null,"A","ABBR","ADDRESS","AREA","ARTICLE","ASIDE","AUDIO","B","BASE","BDI","BDO","BIG","BLOCKQUOTE","BODY","BR","BUTTON","CANVAS","CAPTION","CITE","CODE","COL","COLGROUP","DATA","DATALIST","DD","DEL","DETAILS","DFN","DIALOG","DIV","DL","DT","EM","EMBED","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEAD","HEADER","HR","HTML","I","IFRAME","IMG","INPUT","INS","KBD","KEYGEN","LABEL","LEGEND","LI","LINK","MAIN","MAP","MARK","MENU","MENUITEM","META","METER","NAV","NOSCRIPT","OBJECT","OL","OPTGROUP","OPTION","OUTPUT","P","PARAM","PICTURE","PRE","PROGRESS","Q","RP","RT","RUBY","S","SAMP","SCRIPT","SECTION","SELECT","SMALL","SOURCE","SPAN","STRONG","STYLE","SUB","SUMMARY","SUP","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TIME","TITLE","TR","TRACK","U","UL","VAR","VIDEO","WBR","circle","clipPath","defs","ellipse","g","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan","use"]);c([null]);let h=[null,"scrollLeft","scrollTop","value","paused","currentTime","controls"];c(h);let p=h.filter(e=>!!e),m=["NOSCRIPT","SCRIPT","TITLE","FRAME"];var f=i(7350),g=i.n(f),v=i(3851),b=i(516);function y(e,t,i,n,r){let s,{timing:o="after",async:a=!0}=r,l=e.prototype,c=Object.getOwnPropertyDescriptor(l,t),u=c[i];if(!c||"function"!=typeof u)return()=>{};let d=a?function(){for(var e=arguments.length,t=Array(e),i=0;in(...t),0)}catch(e){}}:function(){for(var e=arguments.length,t=Array(e),i=0;i{let n=e.prototype,r=Object.getOwnPropertyDescriptor(n,t);r[i]=u,Object.defineProperty(n,t,r)}}class _ extends(0,b.j)(Object){init(){}addPassiveDocumentListener(e,t,i){void 0===i&&(i=!1),this.callOnDispose((0,v.q2)(this.shipper.document,e,t,{capture:i,passive:!0}))}addPassiveWindowListener(e,t,i){void 0===i&&(i=!1),this.callOnDispose((0,v.q2)(this.shipper.window,e,t,{capture:i,passive:!0}))}get document(){return this.shipper.document}get window(){return this.shipper.window}get changeQueue(){return this.shipper.changeQueue}get serializer(){return this.shipper.serializer}constructor(e){super(),this.shipper=e}}class w extends _{clear(){this.changes=[],this.changedGlobals.clear(),this.changedNodes.clear()}globalChanged(e){this.changedGlobals.add(e)}eventHappened(e){this.changes.push(e)}nodeTreeChanged(e,t,i,n){let r=[this.serializer.nodeToId(e),0,null!=i?this.serializer.nodeToId(i):0,0];if(t.length>0){r[1]=[];for(let e=0;e0){r[3]=[];for(let e=0;e{e.forEachProperty(e=>{this.changes.push([5,this.serializer.serializeNodePropertyRow(t,e)])}),e.forEachAttribute(e=>{this.changes.push([3,this.serializer.serializeNodeAttributeRow(t,e)])}),e.data&&this.changes.push([4,this.serializer.serializeNodeDataRow(t)])}),this.changedGlobals.size>0&&this.changedGlobals.forEach(e=>{this.changes.push(e.serialize())});let e=this.changes;return this.clear(),e}isRelevantNodeType(e){let{Node:t}=this.shipper.window,{nodeType:i}=e;return i===t.TEXT_NODE||i===t.ELEMENT_NODE&&!m.includes(e.tagName)||i===t.DOCUMENT_NODE}getNodeChanges(e){if(this.changedNodes.has(e))return this.changedNodes.get(e);{let t=new E;return this.changedNodes.set(e,t),t}}constructor(e){super(e),this.changes=[],this.changedGlobals=new Set,this.changedNodes=new Map}}class E{markProperty(e){this.properties[e]=!0}markAttribute(e){this.attributes[e]=!0}markData(){this.data=!0}forEachProperty(e){Object.keys(this.properties).forEach(e)}forEachAttribute(e){Object.keys(this.attributes).forEach(e)}constructor(){this.properties={},this.attributes={},this.data=!1}}class A extends _{clear(){this.knownNodeIds.clear(),this.newNodes=[],this.removedNodes=null,this.nextRemovedNodes=null}nodeToId(e){let t;if(!e)throw Error("nodeToId called without node");return this.nodesToIds.has(e)?t=this.nodesToIds.get(e):(t=this.idSeq++,this.nodesToIds.set(e,t)),this.knownNodeIds.has(t)||(this.newNodes.push(e),this.knownNodeIds.add(t)),this.removedNodes&&this.removedNodes.delete(e),t}idTree(e){let t=[this.nodeToId(e)];if(e.shadowRoot&&t.push(this.idTree(e.shadowRoot)),e.hasChildNodes())for(let i=0;ithis.serializeNodeRow(e))}takeDeletions(){let e=[];if(this.removedNodes)for(let t of this.removedNodes){let i=this.nodesToIds.get(t);i&&!(0,v.FS)(t,this.document)&&(this.nodesToIds.delete(t),this.knownNodeIds.delete(i),e.push(i))}return this.removedNodes=this.nextRemovedNodes,this.nextRemovedNodes=null,e}take(){return[this.takeNew(),this.takeDeletions()]}serializeNodeRow(e){let t=A.nodeSerializers[e.nodeType],i=t?this[t](e):[];return[this.nodeToId(e),e.nodeType,...i]}serializeNodeAttributeRow(e,t){return[this.nodeToId(e),...this.serializeAttribute(e,t)]}serializeNodePropertyRow(e,t){return[this.nodeToId(e),...this.serializeProperty(e,t)]}serializeNodeDataRow(e){let t=A.nodeDataSerializers[e.nodeType],i=t?this[t](e):"";return[this.nodeToId(e),i]}serialize_Element(e){var t,i,n;return[null!=(i=null!=(t=d[e.tagName])?t:e.tagName)?i:"",null!=(n=u[e.namespaceURI])?n:0,this.serializeAttributes(e),this.serializeProperties(e)]}serialize_DocumentType(e){return[e.name,e.publicId,e.systemId]}serialize_Text(e){return[this.serialize_Text_data(e)]}serialize_DocumentFragment(e){return[+(e instanceof this.window.ShadowRoot)]}serialize_Text_data(e){let t=e.parentNode;if(t){if("STYLE"===t.tagName)return this.serialize_Text_data_STYLEchild(e);else if("TEXTAREA"===t.tagName)return this.serialize_Text_data_TEXTAREAchild(e);else if("SCRIPT"===t.tagName)return this.serialize_Text_data_SCRIPTchild(e)}return this.serialize_Text_data_default(e)}serialize_Text_data_default(e){return String(e.data)}serialize_Text_data_STYLEchild(e){return this.rewriteStyleSheet(this.styleSheetAsText(e.parentNode,e))}serialize_Text_data_TEXTAREAchild(e){return this.maskValue(this.serialize_Text_data_default(e))}serialize_Text_data_SCRIPTchild(e){return""}serializeAttribute(e,t){let i=null,n=0;if("style"===t)i=e.style.cssText||e.getAttribute("style");else{let s=e.getAttributeNode(t);if(s){var r;t=s.name,"string"==typeof(i=s.value)&&(i.length>2048?i="":this.isSubmitInput(e)||"value"!==t||(i=this.maskValue(i))),n=null!=(r=u[s.namespaceURI])?r:0}}return[t,n,i]}serializeAttributes(e){let t=[];if(e.attributes)for(let i=0;i0?t:0}serializeProperty(e,t){if(!p.includes(t))return[0,0];{let i;return i=this.isSubmitInput(e)||"value"!==t||"string"!=typeof e.value?e[t]:this.maskValue(e.value),[t,i]}}serializeProperties(e){let t=[];return 0!==e.scrollLeft&&t.push(["scrollLeft",e.scrollLeft]),0!==e.scrollTop&&t.push(["scrollTop",e.scrollTop]),null!=e.value&&t.push(this.serializeProperty(e,"value")),e instanceof this.window.HTMLMediaElement&&(t.push(["paused",e.paused]),t.push(["currentTime",e.currentTime]),t.push(["controls",e.controls])),t.length>0?t:0}maskValue(e){return e&&Array(e.length+1).join("•")}styleSheetAsText(e,t){if(e.dataset.guruExtensionId)return"";if(e.childNodes.length>1)return String(t.data);try{let t="";for(let n=0;n{let t=e.target;t&&t!==this.document?(this.changeQueue.nodePropertyChanged(t,"scrollLeft"),this.changeQueue.nodePropertyChanged(t,"scrollTop"),this.shipper.sendFrame()):this.onDocumentScroll()},this.onDocumentScroll=t}}class C extends S{init(){this.updateBaseLocation()}serialize(){return[14,[this.baseLocation,this.document.location.href]]}constructor(...e){super(...e),this.onLocationChange=()=>{this.updateBaseLocation(),this.changed()},this.updateBaseLocation=()=>{this.baseLocation=(this.document.getElementsByTagName("base")[0]||{}).href||this.document.location.href.match(/^(.*\/)[^/]*$/)[1]}}}let T=[C,class extends S{serialize(){return[1,[this.serializer.idTree(this.document)]]}},class extends S{init(){this.scrollListener.init()}cleanup(){this.scrollListener.dispose(),super.cleanup()}serialize(){let e=this.document.scrollingElement||this.document.documentElement;return[6,e?[e.scrollLeft,e.scrollTop]:[0,0]]}constructor(e){super(e),this.onScroll=()=>{this.changed()},this.scrollListener=new x(e,this.onScroll)}},class extends S{init(){this.addPassiveDocumentListener("mousemove",this.onMouseMove),this.addPassiveDocumentListener("mouseleave",this.onMouseLeave)}serialize(){return[7,[this.x,this.y,this.target?this.serializer.nodeToId(this.target):0]]}constructor(...e){super(...e),this.x=-1,this.y=-1,this.target=null,this.onMouseMove=e=>{this.x=e.clientX,this.y=e.clientY,this.target=e.target,this.changed()},this.onMouseLeave=()=>{this.x=this.y=-1,this.target=null,this.changed()}}},class extends _{init(){this.addPassiveDocumentListener("mousedown",this.onMouseDown,!0)}constructor(...e){super(...e),this.onMouseDown=e=>{this.changeQueue.eventHappened([8,[e.clientX,e.clientY]]),this.shipper.sendFrame()}}},class extends S{init(){this.addPassiveWindowListener("resize",this.onResize)}serialize(){return[9,[this.window.innerWidth,this.window.innerHeight]]}constructor(...e){super(...e),this.onResize=()=>{this.changed()}}},class extends S{init(){this.addPassiveDocumentListener("visibilitychange",this.onVisibilityChange),this.addPassiveWindowListener("pagehide",this.onPageHide)}get isVisible(){return"visible"===this.document.visibilityState}serialize(){return[10,[0|this.isVisible]]}constructor(...e){super(...e),this.navigating=!1,this.onVisibilityChange=()=>{this.navigating||this.changed()},this.onPageHide=()=>{this.navigating=!0}}},class extends S{init(){this.addPassiveWindowListener("focus",this.onWindowFocus),this.addPassiveWindowListener("blur",this.onWindowBlur)}serialize(){return[11,[0|this.document.hasFocus()]]}constructor(...e){super(...e),this.onWindowFocus=()=>{this.changed()},this.onWindowBlur=()=>{this.changed()}}},class extends S{init(){this.addPassiveDocumentListener("selectionchange",this.onSelectionChange)}serialize(){let e=this.document.getSelection();if(!e||0===e.rangeCount||e.isCollapsed)return[12,[0]];{let t=e.getRangeAt(0);return[12,[this.serializer.nodeToId(t.startContainer),t.startOffset,this.serializer.nodeToId(t.endContainer),t.endOffset]]}}constructor(...e){super(...e),this.onSelectionChange=()=>{this.changed()}}},class extends S{init(){this.addPassiveDocumentListener("focus",this.onFocus,!0),this.addPassiveDocumentListener("blur",this.onBlur,!0)}serialize(){return[13,[this.target?this.serializer.nodeToId(this.target):0]]}constructor(...e){super(...e),this.target=null,this.onFocus=e=>{this.target=e.target,this.changed()},this.onBlur=()=>{this.target=null,this.changed()}}},class extends _{init(){this.observer=new MutationObserver(this.onMutations),this.observeElement(this.document),this.createAttachShadowSpy(),this.observeExistingShadowRoots(this.document)}cleanup(){var e;null==(e=this.observer)||e.disconnect(),this.observer=null}observeElement(e){this.observer.observe(e,{childList:!0,characterData:!0,attributes:!0,subtree:!0})}observeExistingShadowRoots(e,t){let{skipRoot:i=!1}=void 0===t?{}:t,n=this.document.createTreeWalker(e,this.window.NodeFilter.SHOW_ELEMENT),r=i?n.nextNode():n.currentNode;for(;r;)this.observeShadowRootNode(r),r=n.nextNode()}createAttachShadowSpy(){this.callOnDispose(y(this.window.Element,"attachShadow","value",this.onAttachShadow,{timing:"after",async:!0}))}constructor(...e){super(...e),this.onMutations=e=>{let t=!1;for(let i=0;i{let t=e instanceof this.window.ShadowRoot?e:e.shadowRoot;t&&(this.observeElement(t),this.observeExistingShadowRoots(t,{skipRoot:!0}))},this.onAttachShadow=e=>{e.shadowRoot&&this.onMutations([{type:"childList",target:e,addedNodes:[e.shadowRoot],removedNodes:[],nextSibling:null}])}}},class extends _{init(){let{CSSStyleSheet:e}=this.window;["insertRule","deleteRule"].forEach(t=>{this.callOnDispose(y(e,t,"value",this.onCSSRuleChange,{timing:"after",async:!0}))})}constructor(...e){super(...e),this.onCSSRuleChange=e=>{let t=null==e?void 0:e.ownerNode,i=null==t?void 0:t.childNodes[0];t&&i&&(this.changeQueue.nodeDataChanged(i),this.shipper.sendFrame())}}},class extends _{init(){this.addPassiveDocumentListener("play",this.onPlayStateChange,!0),this.addPassiveDocumentListener("pause",this.onPlayStateChange,!0)}constructor(...e){super(...e),this.onPlayStateChange=e=>{e.target&&(this.changeQueue.nodePropertyChanged(e.target,"paused"),this.changeQueue.nodePropertyChanged(e.target,"currentTime"),this.shipper.sendFrame())}}},class extends _{init(){this.addPassiveDocumentListener("input",this.onInputEvent)}constructor(e){super(e),this.onInputEvent=e=>{let{target:t}=e;("INPUT"===t.tagName||"TEXTAREA"===t.tagName)&&this.onInputValueChange(t)},this.onInputValueChange=e=>{this.changeQueue.nodePropertyChanged(e,"value"),this.shipper.sendFrame()},this.shipper.observeInputValue&&[this.window.HTMLInputElement,this.window.HTMLTextAreaElement].forEach(e=>{this.callOnDispose(y(e,"value","set",this.onInputValueChange,{timing:"after",async:!0}))})}}];class k{dispose(){this.clear(),this.helpers.forEach(e=>e.dispose())}clear(){this.serializer.clear(),this.changeQueue.clear(),this.sendFrame.cancel()}start(){this.started||(this.helpers.forEach(e=>e.init()),this.started=!0,this.sendKeyframe())}sendKeyframe(){if(!this.started)return;this.clear();let e=this.keyframeHelpers.map(e=>e.serialize()),[t,i]=this.serializer.take();this.sendMessage([1,1,e,t,i])}onNestedShipperMessage(e,t){this.changeQueue.nestedShipperMessage(e,t),this.sendFrame()}constructor(e,t,i,n=!1){this.sendFrame=g()(()=>{let e=this.changeQueue.take(),[t,i]=this.serializer.take();this.sendMessage([1,2,e,t,i])},66.66666666666667),this.window=e,this.document=t,this.sendMessage=i,this.observeInputValue=n,this.started=!1,this.serializer=new A(this),this.changeQueue=new w(this),this.helpers=[],this.keyframeHelpers=[],T.forEach(e=>{let t=new e(this);this.helpers.push(t),e.includedInKeyframe&&this.keyframeHelpers.push(t)})}}var I=i(5671);class O extends I.A{cleanup(){this.shipper.dispose(),this.widget.stopShipper(),super.cleanup()}recreateShipper(){this.shipper.dispose(),this.shipper=new k(window,document,this.sendMessage)}static getLastLocation(e){let t;return e[2].forEach(e=>{14===e[0]&&(t=e[1][1])}),t}refreshDisableLiveView(e){this.disableLiveView=!!this.denylistedVisitorStreamDomains.length&&(0,n._F)(this.denylistedVisitorStreamDomains,e,!0)}constructor(e,t){super(e),this.disableLiveView=!1,this.onReceived=e=>{e.start&&1<=e.start&&(this.shipper.started?(this.shipper.sendKeyframe(),this.widget.requestKeyframe()):(this.shipper.start(),this.widget.startShipper()))},this.onCableDisconnected=()=>{this.recreateShipper(),this.widget.stopShipper()},this.sendMessage=e=>{var t;if(null==(t=this.featureFlags)?void 0:t.liveViewBlockListSpa)this.refreshLocationState(),this.refreshDisableLiveView(this.currentLocation);else{let t=O.getLastLocation(e);t&&this.refreshDisableLiveView(t)}this.disableLiveView&&(e[3]=[],e[4]=[]),this.channel.sendLiveView({m:e})},this.onMessageFromWidget=(e,t)=>{this.shipper.onNestedShipperMessage(e,t)},this.refreshLocationState=()=>{let e=this.shipper.window.location.href;if(e!==this.currentLocation){this.currentLocation=e;let t=this.shipper.helpers.find(e=>e instanceof C);t&&t.onLocationChange()}},this.shipper=new k(window,document,this.sendMessage),this.channel.on("receivedLiveView",this.onReceived),this.channel.on("disconnected",this.onCableDisconnected),this.denylistedVisitorStreamDomains=t,this.currentLocation=this.shipper.window.location.href}}class F extends I.A{create(){return!this.widget.config.isComplete||this.widget.config.disableLiveView?this.container.resolve("emptyPageMirror"):this.container.resolve("pageMirror",this.widget.config.denylistedVisitorStreamDomains||[])}constructor(e){super(e),e.container.set("emptyPageMirror",{}),e.container.register1("pageMirror",O)}}},7377:function(e,t,i){"use strict";var n,r;let s,o,a,l,c;i.d(t,{N:()=>tr,i:()=>tn});class u extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}let d=Object.prototype.toString;function h(e){switch(d.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return w(e,Error)}}function p(e,t){return d.call(e)===`[object ${t}]`}function m(e){return p(e,"ErrorEvent")}function f(e){return p(e,"DOMError")}function g(e){return p(e,"String")}function v(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function b(e){return p(e,"Object")}function y(e){return"undefined"!=typeof Event&&w(e,Event)}function _(e){return!!(e&&e.then&&"function"==typeof e.then)}function w(e,t){try{return e instanceof t}catch(e){return!1}}function E(e){return new S(t=>{t(e)})}function A(e){return new S((t,i)=>{i(e)})}(r=n||(n={}))[r.PENDING=0]="PENDING",r[r.RESOLVED=1]="RESOLVED",r[r.REJECTED=2]="REJECTED";class S{constructor(e){S.prototype.__init.call(this),S.prototype.__init2.call(this),S.prototype.__init3.call(this),S.prototype.__init4.call(this),this._state=n.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new S((i,n)=>{this._handlers.push([!1,t=>{if(e)try{i(e(t))}catch(e){n(e)}else i(t)},e=>{if(t)try{i(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new S((t,i)=>{let n,r;return this.then(t=>{r=!1,n=t,e&&e()},t=>{r=!0,n=t,e&&e()}).then(()=>{r?i(n):t(n)})})}__init(){this._resolve=e=>{this._setResult(n.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(n.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===n.PENDING){if(_(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===n.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===n.RESOLVED&&e[1](this._value),this._state===n.REJECTED&&e[2](this._value),e[0]=!0)})}}}function x(e){return e&&e.Math==Math?e:void 0}let C="object"==typeof globalThis&&x(globalThis)||"object"==typeof window&&x(window)||"object"==typeof self&&x(self)||"object"==typeof i.g&&x(i.g)||function(){return this}()||{};function T(e,t,i){let n=i||C,r=n.__SENTRY__=n.__SENTRY__||{};return r[e]||(r[e]=t())}let k={};function I(e){if(!("console"in C))return e();let t=C.console,i={},n=Object.keys(k);n.forEach(e=>{let n=k[e];i[e]=t[e],t[e]=n});try{return e()}finally{n.forEach(e=>{t[e]=i[e]})}}let O=(l=!1,c={enable:()=>{l=!0},disable:()=>{l=!1},isEnabled:()=>l},["debug","info","warn","error","log","assert","trace"].forEach(e=>{c[e]=()=>void 0}),c),F=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function M(e,t=!1){let{host:i,path:n,pass:r,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&r?`:${r}`:""}@${i}${s?`:${s}`:""}/${n?`${n}/`:n}${o}`}function P(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function D(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function L(e,t=[],i=!1){return t.some(t=>(function(e,t,i=!1){return!!g(e)&&(p(t,"RegExp")?t.test(e):!!g(t)&&(i?e===t:e.includes(t)))})(e,t,i))}function R(e){if(h(e))return{message:e.message,name:e.name,stack:e.stack,...B(e)};if(!y(e))return e;{let t={type:e.type,target:N(e.target),currentTarget:N(e.currentTarget),...B(e)};return"undefined"!=typeof CustomEvent&&w(e,CustomEvent)&&(t.detail=e.detail),t}}function N(e){try{return"undefined"!=typeof Element&&w(e,Element)?function(e,t={}){if(!e)return"";try{let i,n=e,r=[],s=0,o=0,a=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<5&&(i=function(e,t){let i,n,r,s,o,a=[];if(!e||!e.tagName)return"";if(C.HTMLElement&&e instanceof HTMLElement&&e.dataset&&e.dataset.sentryComponent)return e.dataset.sentryComponent;a.push(e.tagName.toLowerCase());let l=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(l&&l.length)l.forEach(e=>{a.push(`[${e[0]}="${e[1]}"]`)});else if(e.id&&a.push(`#${e.id}`),(i=e.className)&&g(i))for(o=0,n=i.split(/\s+/);o1)||!(o+3*r.length+i.length>=l)));)r.push(i),o+=i.length,n=n.parentNode;return r.reverse().join(" > ")}catch(e){return""}}(e):Object.prototype.toString.call(e)}catch(e){return""}}function B(e){if("object"!=typeof e||null===e)return{};{let t={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}}function U(e){return function e(t,i){if(function(e){if(!b(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(t)){let n=i.get(t);if(void 0!==n)return n;let r={};for(let n of(i.set(t,r),Object.keys(t)))void 0!==t[n]&&(r[n]=e(t[n],i));return r}if(Array.isArray(t)){let n=i.get(t);if(void 0!==n)return n;let r=[];return i.set(t,r),t.forEach(t=>{r.push(e(t,i))}),r}return t}(e,new Map)}let j=/\(error: (.*)\)/,z=/captureMessage|captureException/,q="";function H(e,t=100,n=Infinity){try{return function e(t,n,r=Infinity,s=Infinity,o=function(){let e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(i){if(e)return!!t.has(i)||(t.add(i),!1);for(let e=0;e=s){d[t]="[MaxProperties ~]";break}let i=p[t];d[t]=e(t,i,u-1,s,o),h++}return l(n),d}("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function V(e,t=[]){return[e,t]}function W(e,t){for(let i of e[1]){let e=i[0].type;if(t(i,e))return!0}return!1}function Q(e,t){return(t||new TextEncoder).encode(e)}let G={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function $(e){if(!e||!e.sdk)return;let{name:t,version:i}=e.sdk;return{name:t,version:i}}function K(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Y(){let e=C.crypto||C.msCrypto,t=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(t=()=>{let t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(e){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&t())>>e/4).toString(16))}function J(e,t,i){let n=e.exception=e.exception||{},r=n.values=n.values||[],s=r[0]=r[0]||{};s.value||(s.value=t||""),s.type||(s.type=i||"Error")}function X(e,t){var i;let n=(i=e).exception&&i.exception.values?i.exception.values[0]:void 0;if(!n)return;let r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function Z(e){if(e&&e.__sentry_captured__)return!0;try{try{Object.defineProperty(e,"__sentry_captured__",{value:!0,writable:!0,configurable:!0})}catch(e){}}catch(e){}return!1}function ee(){return Date.now()/1e3}let et=function(){let{performance:e}=C;if(!e||!e.now)return ee;let t=Date.now()-e.now(),i=void 0==e.timeOrigin?t:e.timeOrigin;return()=>(i+e.now())/1e3}();(()=>{let{performance:e}=C;if(!e||!e.now)return;let t=e.now(),i=Date.now(),n=e.timeOrigin?Math.abs(e.timeOrigin+t-i):36e5,r=e.timing&&e.timing.navigationStart,s="number"==typeof r?Math.abs(r+t-i):36e5;if((n<36e5||s<36e5)&&n<=s)return e.timeOrigin})();let ei="production";function en(){return T("globalEventProcessors",()=>[])}function er(e){en().push(e)}function es(e,t,i,n=0){return new S((r,s)=>{let o=e[n];if(null===t||"function"!=typeof o)r(t);else{let a=o({...t},i);_(a)?a.then(t=>es(e,t,i,n+1).then(r)).then(null,s):es(e,a,i,n+1).then(r).then(null,s)}})}function eo(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||et(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Y()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ea(){return ew().getClient()}function el(e){return e.transaction}function ec(e){return"function"==typeof e.getSpanJSON?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function eu(e,t,i){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},{segment:s}=i&&i.getUser()||{},o=U({environment:n.environment||ei,release:n.release,user_segment:s,public_key:r,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function ed(e,t){var i,n,r,s,o,a,l;let c,{fingerprint:u,span:d,breadcrumbs:h,sdkProcessingMetadata:p}=t;(function(e,t){let{extra:i,tags:n,user:r,contexts:s,level:o,transactionName:a}=t,l=U(i);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});let c=U(n);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});let u=U(r);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=U(s);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),a&&(e.transaction=a)})(e,t),d&&function(e,t){e.contexts={trace:function(e){let{spanId:t,traceId:i}=e.spanContext(),{data:n,op:r,parent_span_id:s,status:o,tags:a,origin:l}=ec(e);return U({data:n,op:r,parent_span_id:s,span_id:t,status:o,tags:a,trace_id:i,origin:l})}(t),...e.contexts};let i=el(t);if(i){e.sdkProcessingMetadata={dynamicSamplingContext:function(e){let t=ea();if(!t)return{};let i=eu(ec(e).trace_id||"",t,ew().getScope()),n=el(e);if(!n)return i;let r=n&&n._frozenDynamicSamplingContext;if(r)return r;let{sampleRate:s,source:o}=n.metadata;null!=s&&(i.sample_rate=`${s}`);let a=ec(n);return o&&"url"!==o&&(i.transaction=a.description),i.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return!!(1&t)}(n)),t.emit&&t.emit("createDsc",i),i}(t),...e.sdkProcessingMetadata};let n=ec(i).description;n&&(e.tags={transaction:n,...e.tags})}}(e,d),i=e,n=u,i.fingerprint=i.fingerprint?Array.isArray(r=i.fingerprint)?r:[r]:[],n&&(i.fingerprint=i.fingerprint.concat(n)),i.fingerprint&&!i.fingerprint.length&&delete i.fingerprint,s=e,o=h,c=[...s.breadcrumbs||[],...o],s.breadcrumbs=c.length?c:void 0,a=e,l=p,a.sdkProcessingMetadata={...a.sdkProcessingMetadata,...l}}function eh(e,t){let{extra:i,tags:n,user:r,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:p,span:m}=t;ep(e,"extra",i),ep(e,"tags",n),ep(e,"user",r),ep(e,"contexts",s),ep(e,"sdkProcessingMetadata",a),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function ep(e,t,i){if(i&&Object.keys(i).length)for(let n in e[t]={...e[t]},i)Object.prototype.hasOwnProperty.call(i,n)&&(e[t][n]=i[n])}class em{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ef()}static clone(e){return e?e.clone():new em}clone(){let e=new em;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&eo(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e;if(t instanceof em){let e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else b(t)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext));return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=ef(),this}addBreadcrumb(e,t){let i="number"==typeof t?t:100;if(i<=0)return this;let n={timestamp:ee(),...e},r=this._breadcrumbs;return r.push(n),this._breadcrumbs=r.length>i?r.slice(-i):r,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:e,_attachments:t,_contexts:i,_tags:n,_extra:r,_user:s,_level:o,_fingerprint:a,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:u,_transactionName:d,_span:h}=this;return{breadcrumbs:e,attachments:t,contexts:i,tags:n,extra:r,user:s,level:o,fingerprint:a||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:u,transactionName:d,span:h}}applyToEvent(e,t={},i=[]){return ed(e,this.getScopeData()),es([...i,...en(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let i=t&&t.event_id?t.event_id:Y();if(!this._client)return O.warn("No client configured on scope - will not capture exception!"),i;let n=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:n,...t,event_id:i},this),i}captureMessage(e,t,i){let n=i&&i.event_id?i.event_id:Y();if(!this._client)return O.warn("No client configured on scope - will not capture message!"),n;let r=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:r,...i,event_id:n},this),n}captureEvent(e,t){let i=t&&t.event_id?t.event_id:Y();return this._client?this._client.captureEvent(e,{...t,event_id:i},this):O.warn("No client configured on scope - will not capture event!"),i}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function ef(){return{traceId:Y(),spanId:Y().substring(16)}}let eg="7.119.1",ev=parseFloat(eg);class eb{constructor(e,t,i,n=ev){let r,s;this._version=n,t?r=t:(r=new em).setClient(e),i?s=i:(s=new em).setClient(e),this._stack=[{scope:r}],e&&this.bindClient(e),this._isolationScope=s}isOlderThan(e){return this._version(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let i=this._lastEventId=t&&t.event_id?t.event_id:Y(),n=Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:n,...t,event_id:i}),i}captureMessage(e,t,i){let n=this._lastEventId=i&&i.event_id?i.event_id:Y(),r=Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:r,...i,event_id:n}),n}captureEvent(e,t){let i=t&&t.event_id?t.event_id:Y();return e.type||(this._lastEventId=i),this.getScope().captureEvent(e,{...t,event_id:i}),i}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:i,client:n}=this.getStackTop();if(!n)return;let{beforeBreadcrumb:r=null,maxBreadcrumbs:s=100}=n.getOptions&&n.getOptions()||{};if(s<=0)return;let o={timestamp:ee(),...e},a=r?I(()=>r(o,t)):o;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),i.addBreadcrumb(a,s))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){let{scope:t,client:i}=this.getStackTop();i&&e(t)}run(e){let t=e_(this);try{e(this)}finally{e_(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(e){return null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e,t=this.getStackTop().scope,i=t.getSession();i&&(e={},"ok"===i.status&&(e={status:"exited"}),eo(i,e)),this._sendSessionUpdate(),t.setSession()}startSession(e){var t;let i,n,{scope:r,client:s}=this.getStackTop(),{release:o,environment:a=ei}=s&&s.getOptions()||{},{userAgent:l}=C.navigator||{},c=(t={release:o,environment:a,user:r.getUser(),...l&&{userAgent:l},...e},i=et(),n={sid:Y(),init:!0,timestamp:i,started:i,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>{var e;return e=n,U({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}},t&&eo(n,t),n),u=r.getSession&&r.getSession();return u&&"ok"===u.status&&eo(u,{status:"exited"}),this.endSession(),r.setSession(c),c}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),i=e.getSession();i&&t&&t.captureSession&&t.captureSession(i)}_callExtensionMethod(e,...t){let i=ey().__SENTRY__;if(i&&i.extensions&&"function"==typeof i.extensions[e])return i.extensions[e].apply(this,t)}}function ey(){return C.__SENTRY__=C.__SENTRY__||{extensions:{},hub:void 0},C}function e_(e){let t=ey(),i=eA(t);return eS(t,e),i}function ew(){let e=ey();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=ey()){var t;return(!((t=e)&&t.__SENTRY__&&t.__SENTRY__.hub)||eA(e).isOlderThan(ev))&&eS(e,new eb),eA(e)}(e)}function eE(){return ew().getIsolationScope()}function eA(e){return T("hub",()=>new eb,e)}function eS(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}let ex=[];function eC(e,t){for(let i of t)i&&i.afterAllSetup&&i.afterAllSetup(e)}function eT(e,t,i){if(!i[t.name]){if(i[t.name]=t,-1===ex.indexOf(t.name)&&(t.setupOnce(er,ew),ex.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){let i=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,n)=>i(t,n,e))}if(e.addEventProcessor&&"function"==typeof t.processEvent){let i=t.processEvent.bind(t),n=Object.assign((t,n)=>i(t,n,e),{id:t.name});e.addEventProcessor(n)}}}function ek(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}let eI=new WeakMap;class eO{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn&&(this._dsn=function(e){let t="string"==typeof e?function(e){let t=F.exec(e);if(!t)return void I(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[i,n,r="",s,o="",a]=t.slice(1),l="",c=a,u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){let e=c.match(/^\d+/);e&&(c=e[0])}return P({host:s,pass:r,path:l,projectId:c,port:o,protocol:i,publicKey:n})}(e):P(e);if(t&&1)return t}(e.dsn)),this._dsn){const t=function(e,t={}){var i;let n,r,s="string"==typeof t?t:t.tunnel,o="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return s||`${n=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"",`${n}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}${e.projectId}/envelope/?${Object.keys(i={sentry_key:e.publicKey,sentry_version:"7",...o&&{sentry_client:`${o.name}/${o.version}`}}).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(i[e])}`).join("&")}`}(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,i){if(Z(e))return;let n=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,i)).then(e=>{n=e})),n}captureMessage(e,t,i,n){let r=i&&i.event_id,s=v(e)?e:String(e),o=null===e||v(e)||"object"!=typeof e&&"function"!=typeof e?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(o.then(e=>this._captureEvent(e,i,n)).then(e=>{r=e})),r}captureEvent(e,t,i){if(t&&t.originalException&&Z(t.originalException))return;let n=t&&t.event_id,r=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,r||i).then(e=>{n=e})),n}captureSession(e){"string"!=typeof e.release||(this.sendSession(e),eo(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(i=>t.flush(e).then(e=>i&&e))):E(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(e){return null}}addIntegration(e){let t=this._integrations[e.name];eT(this,e,this._integrations),t||eC(this,[e])}sendEvent(e,t={}){var i,n,r,s;let o,a,l,c;this.emit("beforeSendEvent",e,t);let u=(i=this._dsn,n=this._options._metadata,r=this._options.tunnel,o=$(n),a=e.type&&"replay_event"!==e.type?e.type:"event",(s=n&&n.sdk)&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||s.name,e.sdk.version=e.sdk.version||s.version,e.sdk.integrations=[...e.sdk.integrations||[],...s.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...s.packages||[]]),l=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext,c={event_id:e.event_id,sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&i&&{dsn:M(i)},...l&&{trace:U({...l})}},delete e.sdkProcessingMetadata,V(c,[[{type:a},e]]));for(let e of t.attachments||[])u=function(e,t){let[i,n]=e;return[i,[...n,t]]}(u,function(e,t){let i="string"==typeof e.data?Q(e.data,t):e.data;return[U({type:"attachment",length:i.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),i]}(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));let d=this._sendEnvelope(u);d&&d.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){var t,i,n;let r,s=(t=this._dsn,i=this._options._metadata,n=this._options.tunnel,r=$(i),V({sent_at:new Date().toISOString(),...r&&{sdk:r},...!!n&&t&&{dsn:M(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]]));this._sendEnvelope(s)}recordDroppedEvent(e,t,i){if(this._options.sendClientReports){let n=`${e}:${t}`;this._outcomes[n]=(this._outcomes[n]||0)+("number"==typeof i?i:1)}}captureAggregateMetrics(e){var t,i,n;let r,s,o=(t=this._dsn,i=this._options._metadata,n=this._options.tunnel,s={sent_at:new Date().toISOString()},i&&i.sdk&&(s.sdk={name:i.sdk.name,version:i.sdk.version}),n&&t&&(s.dsn=M(t)),V(s,[[{type:"statsd",length:(r=function(e){let t="";for(let i of e){let e=Object.entries(i.tags),n=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${i.name}@${i.unit}:${i.metric}|${i.metricType}${n}|T${i.timestamp} `}return t}(e)).length},r]]));this._sendEnvelope(o)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}_setupIntegrations(){var e;let t,{integrations:i}=this._options;this._integrations=(e=this,t={},i.forEach(i=>{i&&eT(e,i,t)}),t),eC(this,i),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let i=!1,n=!1,r=t.exception&&t.exception.values;if(r)for(let e of(n=!0,r)){let t=e.mechanism;if(t&&!1===t.handled){i=!0;break}}let s="ok"===e.status;(s&&0===e.errors||s&&i)&&(eo(e,{...i&&{status:"crashed"},errors:e.errors||Number(n||i)}),this.captureSession(e))}_isClientDoneProcessing(e){return new S(t=>{let i=0,n=setInterval(()=>{0==this._numProcessing?(clearInterval(n),t(!0)):(i+=1,e&&i>=e&&(clearInterval(n),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,i,n=eE()){let r=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),(function(e,t,i,n,r,o){var a,l;let{normalizeDepth:c=3,normalizeMaxBreadth:u=1e3}=e,d={...t,event_id:t.event_id||i.event_id||Y(),timestamp:t.timestamp||ee()},h=i.integrations||e.integrations.map(e=>e.name);(function(e,t){let{environment:i,release:n,dist:r,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?i:ei),void 0===e.release&&void 0!==n&&(e.release=n),void 0===e.dist&&void 0!==r&&(e.dist=r),e.message&&(e.message=D(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=D(o.value,s));let a=e.request;a&&a.url&&(a.url=D(a.url,s))})(d,e),a=d,(l=h).length>0&&(a.sdk=a.sdk||{},a.sdk.integrations=[...a.sdk.integrations||[],...l]),void 0===t.type&&function(e,t){let i,n=C._sentryDebugIds;if(!n)return;let r=eI.get(t);r?i=r:(i=new Map,eI.set(t,i));let s=Object.keys(n).reduce((e,r)=>{let s,o=i.get(r);o?s=o:(s=t(r),i.set(r,s));for(let t=s.length-1;t>=0;t--){let i=s[t];if(i.filename){e[i.filename]=n[r];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=s[e.filename])})})}catch(e){}}(d,e.stackParser);let p=function(e,t){if(!t)return e;let i=e?e.clone():new em;return i.update(t),i}(n,i.captureContext);i.mechanism&&X(d,i.mechanism);let m=r&&r.getEventProcessors?r.getEventProcessors():[],f=(!s&&(s=new em),s).getScopeData();o&&eh(f,o.getScopeData()),p&&eh(f,p.getScopeData());let g=[...i.attachments||[],...f.attachments];return g.length&&(i.attachments=g),ed(d,f),es([...m,...en(),...f.eventProcessors],d,i).then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let i=e.debug_meta.images;Object.keys(t).forEach(e=>{i.push({type:"sourcemap",code_file:e,debug_id:t[e]})})}(e),"number"==typeof c&&c>0)?function(e,t,i){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:H(e.data,t,i)}}))},...e.user&&{user:H(e.user,t,i)},...e.contexts&&{contexts:H(e.contexts,t,i)},...e.extra&&{extra:H(e.extra,t,i)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=H(e.contexts.trace.data,t,i))),e.spans&&(n.spans=e.spans.map(e=>{let n=ec(e).data;return n&&(e.data=H(n,t,i)),e})),n}(e,c,u):e)})(r,e,t,i,this,n).then(e=>{if(null===e)return e;let t={...n.getPropagationContext(),...i?i.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:n,spanId:r,parentSpanId:s,dsc:o}=t;e.contexts={trace:{trace_id:n,span_id:r,parent_span_id:s},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:o||eu(n,this,i),...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},i){return this._processEvent(e,t,i).then(e=>e.event_id,e=>{})}_processEvent(e,t,i){let n=this.getOptions(),{sampleRate:r}=n,s=eM(e),o=eF(e),a=e.type||"error",l=`before send for type \`${a}\``;if(o&&"number"==typeof r&&Math.random()>r)return this.recordDroppedEvent("sample_rate","error",e),A(new u(`Discarding event because it's not included in the random sample (sampling rate = ${r})`,"log"));let c="replay_event"===a?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,i,d).then(i=>{if(null===i)throw this.recordDroppedEvent("event_processor",c,e),new u("An event processor returned `null`, will not send event.","log");return t.data&&!0===t.data.__sentry__?i:function(e,t){let i=`${t} must return \`null\` or a valid event.`;if(_(e))return e.then(e=>{if(!b(e)&&null!==e)throw new u(i);return e},e=>{throw new u(`${t} rejected with ${e}`)});if(!b(e)&&null!==e)throw new u(i);return e}(function(e,t,i){let{beforeSend:n,beforeSendTransaction:r}=e;if(eF(t)&&n)return n(t,i);if(eM(t)&&r){if(t.spans){let e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return r(t,i)}return t}(n,i,t),l)}).then(n=>{if(null===n){if(this.recordDroppedEvent("before_send",c,e),s){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new u(`${l} returned \`null\`, will not send event.`,"log")}let r=i&&i.getSession();if(!s&&r&&this._updateSessionFromEvent(r,n),s){let e=(n.sdkProcessingMetadata&&n.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(n.spans?n.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let o=n.transaction_info;return s&&o&&n.transaction!==e.transaction&&(n.transaction_info={...o,source:"custom"}),this.sendEvent(n,t),n}).then(null,e=>{if(e instanceof u)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new u(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{})}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[i,n]=t.split(":");return{reason:i,category:n,quantity:e[t]}})}}function eF(e){return void 0===e.type}function eM(e){return"transaction"===e.type}function eP(e,t){var i;let n,r=eL(e,t),s={type:t&&t.name,value:(n=(i=t)&&i.message)?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"};return r.length&&(s.stacktrace={frames:r}),void 0===s.type&&""===s.value&&(s.value="Unrecoverable error caught"),s}function eD(e,t){return{exception:{values:[eP(e,t)]}}}function eL(e,t){let i=t.stacktrace||t.stack||"",n=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(eR.test(e.message))return 1}return 0}(t);try{return e(i,n)}catch(e){}return[]}let eR=/Minified React error #\d+;/i;function eN(e,t,i,n){let r={};if(n&&i){let n=eL(e,i);n.length&&(r.exception={values:[{value:t,stacktrace:{frames:n}}]})}if(v(t)){let{__sentry_template_string__:e,__sentry_template_values__:i}=t;return r.logentry={message:e,params:i},r}return r.message=t,r}class eB extends eO{constructor(e){!function(e,t,i=[t],n="npm"){let r=e._metadata||{};r.sdk||(r.sdk={name:`sentry.javascript.${t}`,packages:i.map(e=>({name:`${n}:@sentry/${e}`,version:eg})),version:eg}),e._metadata=r}(e,"browser",["browser"],C.SENTRY_SDK_SOURCE||"npm"),super(e),e.sendClientReports&&C.document&&C.document.addEventListener("visibilitychange",()=>{"hidden"===C.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){var i,n;let r;return i=this._options.stackParser,n=this._options.attachStacktrace,r=function(e,t,i,n,r){let s;if(m(t)&&t.error)return eD(e,t.error);if(f(t)||p(t,"DOMException")){if("stack"in t)s=eD(e,t);else{let r=t.name||(f(t)?"DOMError":"DOMException"),o=t.message?`${r}: ${t.message}`:r;J(s=eN(e,o,i,n),o)}return"code"in t&&(s.tags={...s.tags,"DOMException.code":`${t.code}`}),s}return h(t)?eD(e,t):(b(t)||y(t)?X(s=function(e,t,i,n){let r=ea(),s=r&&r.getOptions().normalizeDepth,o={exception:{values:[{type:y(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let i=function(e,t=40){let i=Object.keys(R(e));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=t)return D(i[0],t);for(let e=i.length;e>0;e--){let n=i.slice(0,e).join(", ");if(!(n.length>t)){if(e===i.length)return n;return D(n,t)}}return""}(e),n=t?"promise rejection":"exception";if(m(e))return`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``;if(y(e)){let t=function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e);return`Event \`${t}\` (type=${e.type}) captured as ${n}`}return`Object captured as ${n} with keys: ${i}`}(t,{isUnhandledRejection:n})}]},extra:{__serialized__:function e(t,i=3,n=102400){let r=H(t,i);return~-encodeURI(JSON.stringify(r)).split(/%..|./).length>n?e(t,i-1,n):r}(t,s)}};if(i){let t=eL(e,i);t.length&&(o.exception.values[0].stacktrace={frames:t})}return o}(e,t,i,void 0),{synthetic:!0}):(J(s=eN(e,t,i,n),`${t}`,void 0),X(s,{synthetic:!0})),s)}(i,e,t&&t.syntheticException||void 0,n),X(r),r.level="error",t&&t.event_id&&(r.event_id=t.event_id),E(r)}eventFromMessage(e,t="info",i){return function(e,t,i="info",n,r){let s=eN(e,t,n&&n.syntheticException||void 0,r);return s.level=i,n&&n.event_id&&(s.event_id=n.event_id),E(s)}(this._options.stackParser,e,t,i,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return;let t=function(e,{metadata:t,tunnel:i,dsn:n}){return V({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!i&&!!n&&{dsn:M(n)}},[[{type:"user_report"},e]])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,i)}_flushOutcomes(){var e;let t=this._clearOutcomes();if(0===t.length||!this._dsn)return;let i=V((e=this._options.tunnel&&M(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:ee(),discarded_events:t}]]);this._sendEnvelope(i)}}function eU(e,t,i,n){let r={filename:e,function:t,in_app:!0};return void 0!==i&&(r.lineno=i),void 0!==n&&(r.colno=n),r}let ej=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ez=/\((\S*)(?::(\d+))(?::(\d+))\)/,eq=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,eH=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,eV=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,eW=function(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,i=0)=>{let n=[],r=e.split("\n");for(let e=i;e1024)continue;let s=j.test(i)?i.replace(j,"$1"):i;if(!s.match(/\S*Error: /)){for(let e of t){let t=e(s);if(t){n.push(t);break}}if(n.length>=50)break}}var s=n;if(!s.length)return[];let o=Array.from(s);return/sentryWrapped/.test(o[o.length-1].function||"")&&o.pop(),o.reverse(),z.test(o[o.length-1].function||"")&&(o.pop(),z.test(o[o.length-1].function||"")&&o.pop()),o.slice(0,50).map(e=>({...e,filename:e.filename||o[o.length-1].filename,function:e.function||"?"}))}}([30,e=>{let t=ej.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){let e=ez.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}let[e,i]=eQ(t[1]||"?",t[2]);return eU(i,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{let t=eq.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=eH.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],i=t[1]||"?";return[i,e]=eQ(i,e),eU(e,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{let t=eV.exec(e);return t?eU(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0}]),eQ=(e,t)=>{let i=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return i||n?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function eG(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function e$(e,t,i,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:i,parent_id:n}}let eK="LinkedErrors",eY=(e={})=>{let t=e.limit||5,i=e.key||"cause";return{name:eK,setupOnce(){},preprocessEvent(e,n,r){let s=r.getOptions();!function(e,t,i=250,n,r,s,o){var a,l;if(!s.exception||!s.exception.values||!o||!w(o.originalException,Error))return;let c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;c&&(s.exception.values=(a=function e(t,i,n,r,s,o,a,l){if(o.length>=n+1)return o;let c=[...o];if(w(r[s],Error)){eG(a,l);let o=t(i,r[s]),u=c.length;e$(o,s,u,l),c=e(t,i,n,r[s],s,[o,...c],o,u)}return Array.isArray(r.errors)&&r.errors.forEach((r,o)=>{if(w(r,Error)){eG(a,l);let u=t(i,r),d=c.length;e$(u,`errors[${o}]`,d,l),c=e(t,i,n,r,s,[u,...c],u,d)}}),c}(e,t,r,o.originalException,n,s.exception.values,c,0),l=i,a.map(e=>(e.value&&(e.value=D(e.value,l)),e))))}(eP,s.stackParser,s.maxValueLength,i,t,e,n)}}};ek(eK,eY);let eJ="Dedupe",eX=()=>{let e;return{name:eJ,setupOnce(){},processEvent(t){if(t.type)return t;try{var i,n,r,s,o,a;let l,c,u,d;if(i=t,(n=e)&&(r=i,s=n,l=r.message,c=s.message,(l||c)&&(!l||c)&&(l||!c)&&l===c&&e0(r,s)&&eZ(r,s)&&1||(o=i,a=n,u=e1(a),d=e1(o),u&&d&&u.type===d.type&&u.value===d.value&&e0(o,a)&&eZ(o,a))))return null}catch(e){}return e=t}}};function eZ(e,t){let i=e2(e),n=e2(t);if(!i&&!n)return!0;if(i&&!n||!i&&n||n.length!==i.length)return!1;for(let e=0;e({name:e5,setupOnce(){},processEvent:(t,i,n)=>{var r,s,o,a;return(r=t,!((s=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:e3],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:e4],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,n.getOptions())).ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(r)||(o=r,a=s.ignoreErrors,!o.type&&a&&a.length&&(function(e){let t,i=[];e.message&&i.push(e.message);try{t=e.exception.values[e.exception.values.length-1]}catch(e){}return t&&t.value&&(i.push(t.value),t.type&&i.push(`${t.type}: ${t.value}`)),i})(o).some(e=>L(e,a)))||function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;let i=e.transaction;return!!i&&L(i,t)}(r,s.ignoreTransactions)||function(e,t){if(!t||!t.length)return!1;let i=e9(e);return!!i&&L(i,t)}(r,s.denyUrls))&&function(e,t){if(!t||!t.length)return!0;let i=e9(e);return!i||L(i,t)}(r,s.allowUrls))?t:null}});function e9(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let i=e[t];if(i&&""!==i.filename&&"[native code]"!==i.filename)return i.filename||null}return null}(t):null}catch(e){return null}}ek(e5,e6);let e8="HttpContext",e7=()=>({name:e8,setupOnce(){},preprocessEvent(e){if(!C.navigator&&!C.location&&!C.document)return;let t=e.request&&e.request.url||C.location&&C.location.href,{referrer:i}=C.document||{},{userAgent:n}=C.navigator||{},r={...e.request&&e.request.headers,...i&&{Referer:i},...n&&{"User-Agent":n}},s={...e.request,...t&&{url:t},headers:r};e.request=s}});ek(e8,e7);let te="FunctionToString",tt=new WeakMap,ti=()=>({name:te,setupOnce(){o=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=this.__sentry_original__,i=tt.has(ea())&&void 0!==t?t:this;return o.apply(i,e)}}catch(e){}},setup(e){tt.set(e,!0)}});function tn(e){(a=new eB({dsn:"https://242e9ed9349440feaad9f6f49ec89269@o209747.ingest.us.sentry.io/6666957",transport:function(t){return function(e,t,i=function(e){let t=[];function i(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(n){if(!(void 0===e||t.lengthi(r)).then(null,()=>i(r).then(null,()=>{})),r},drain:function(e){return new S((i,n)=>{let r=t.length;if(!r)return i(!0);let s=setTimeout(()=>{e&&e>0&&i(!1)},e);t.forEach(e=>{E(e).then(()=>{--r||(clearTimeout(s),i(!0))},n)})})}}}(e.bufferSize||30)){let n={};function r(r){let s=[];if(W(r,(t,i)=>{let r=G[i];if(function(e,t,i=Date.now()){return(e[t]||e.all||0)>i}(n,r)){let n=K(t,i);e.recordDroppedEvent("ratelimit_backoff",r,n)}else s.push(t)}),0===s.length)return E();let o=V(r[0],s),a=t=>{W(o,(i,n)=>{let r=K(i,n);e.recordDroppedEvent(t,G[n],r)})};return i.add(()=>t({body:function(e,t){let[i,n]=e,r=JSON.stringify(i);function s(e){"string"==typeof r?r="string"==typeof e?r+e:[Q(r,t),e]:r.push("string"==typeof e?Q(e,t):e)}for(let e of n){let[t,i]=e;if(s(` ${JSON.stringify(t)} `),"string"==typeof i||i instanceof Uint8Array)s(i);else{let e;try{e=JSON.stringify(i)}catch(t){e=JSON.stringify(H(i))}s(e)}}return"string"==typeof r?r:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),i=0;for(let n of e)t.set(n,i),i+=n.length;return t}(r)}(o,e.textEncoder)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode),n=function(e,{statusCode:t,headers:i},n=Date.now()){let r={...e},s=i&&i["x-sentry-rate-limits"],o=i&&i["retry-after"];if(s)for(let e of s.trim().split(",")){let[t,i,,,s]=e.split(":",5),o=parseInt(t,10),a=(isNaN(o)?60:o)*1e3;if(i)for(let e of i.split(";"))"metric_bucket"===e?(!s||s.split(";").includes("custom"))&&(r[e]=n+a):r[e]=n+a;else r.all=n+a}else o?r.all=n+function(e,t=Date.now()){let i=parseInt(`${e}`,10);if(!isNaN(i))return 1e3*i;let n=Date.parse(`${e}`);return isNaN(n)?6e4:n-t}(o,n):429===t&&(r.all=n+6e4);return r}(n,e),e),e=>{throw a("network_error"),e})).then(e=>e,e=>{if(e instanceof u)return a("queue_overflow"),E();throw e})}return r.__sentry__baseTransport__=!0,{send:r,flush:e=>i.drain(e)}}(t,function(i){return fetch(e,{body:i.body,method:"POST",headers:{"X-Sentry-URL":t.url}}).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))})},stackParser:eW,integrations:[eY(),eX(),e6(),e7(),ti()],allowUrls:[/https?:\/\/js\.qualified(-dev)?\.com/]})).init()}function tr(){return a}ek(te,ti)},5671:function(e,t,i){"use strict";i.d(t,{A:()=>o});var n=i(1722),r=i(516),s=i(4079);class o extends(0,s._)((0,r.j)(Object)){get config(){return this.widget.config}get visitor(){return this.widget.visitor}get cable(){return this.widget.cable}get channel(){return this.widget.channel}get emitter(){return this.channel.emitter}get tracker(){return this.widget.tracker}get pageMirror(){return this.widget.pageMirror}get analytics(){return this.widget.analytics}get apiHandler(){return this.widget.apiHandler}get dateProvider(){return this.widget.dateProvider}get locationProvider(){return this.widget.locationProvider}get heartbeatManager(){return this.widget.heartbeatManager}get iframeManager(){return this.widget.iframeManager}get featureFlags(){var e;return null!=(e=this.widget.config.featureFlags)?e:{}}get pageViewActivityEmitter(){return this.widget.pageViewActivityEmitter}get offerScript(){return this.widget.offerScript}get contentActivityEmitter(){return this.widget.contentActivityEmitter}}(0,n.Cg)([s.W,(0,n.Sn)("design:type","undefined"==typeof Widget?Object:Widget)],o.prototype,"widget",void 0)},1722:function(e,t,i){"use strict";i.d(t,{Cg:()=>n,Sn:()=>r});function n(e,t,i,n){var r,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,i,o):r(t,i))||o);return s>3&&o&&Object.defineProperty(t,i,o),o}function r(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e](i,i.exports,__webpack_require__),i.loaded=!0,i.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((t,i)=>(__webpack_require__.f[i](e,t),t),[])),__webpack_require__.u=e=>"js/"+(({243:"offers",29:"multimodal_v2",342:"dummyModule",587:"liveView",762:"analytics",874:"multimodal"})[e]||e)+"-"+({243:"9c49ce66",29:"65a4778e",342:"175c5b50",587:"d2da98ac",612:"ccd00f13",762:"9bbd1077",830:"7deec06a",874:"4b334629"})[e]+".js",__webpack_require__.miniCssF=e=>""+e+".css",__webpack_require__.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="fireball:";__webpack_require__.l=function(i,n,r,s){if(e[i])return void e[i].push(n);if(void 0!==r)for(var o,a,l=document.getElementsByTagName("script"),c=0;c{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="/packs/",(()=>{var e={148:0};__webpack_require__.f.j=function(t,i){var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var r=new Promise((i,r)=>n=e[t]=[i,r]);i.push(n[2]=r);var s=__webpack_require__.p+__webpack_require__.u(t),o=Error();__webpack_require__.l(s,function(i){if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;o.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",o.name="ChunkLoadError",o.type=r,o.request=s,n[1](o)}},"chunk-"+t,t)}};var t=(t,i)=>{var n,r,[s,o,a]=i,l=0;if(s.some(t=>0!==e[t])){for(n in o)__webpack_require__.o(o,n)&&(__webpack_require__.m[n]=o[n]);a&&a(__webpack_require__)}for(t&&t(i);l{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>iQ});var e,t,i=__webpack_require__(9108),n=__webpack_require__(2282),r=__webpack_require__(2510),s=__webpack_require__(5023),o=__webpack_require__(67);__webpack_require__(6245);var a=__webpack_require__(1882),l=__webpack_require__.n(a),c=__webpack_require__(6408),u=__webpack_require__(5671);let d=["initialize","open","initPardotForm","initPardotFormThankYou","parsePardotForm","parsePardotFormForLandingPage","saveFormData","saveSmartFormData","sendSmartFormData","pardotFormSubmitted","showExperience","endExperience","registerForm","showForm","showFormExperience","showExperienceForForm","getIdentity","handleEvents","handleMessengerEvents","handleWidgetEvents","identify","page","setCookieConsent","teardown","emitFormFill","submitEmbeddedForm","logDebugEvent","setChatIsVisible"],h=["open","showExperience"],p="p.email input, div.email input";var m=(0,o._)("_initDeclarativeApi"),f=(0,o._)("_initSmartForms");class g extends u.A{init(){var e=this;window.QualifiedObject||(window.QualifiedObject="qualified");let t=window.QualifiedObject,i=window[t];if(l()(i)&&Array.isArray(i.q)&&i.q.length>0){let e=i.q,t=e.findIndex(e=>e&&"initialize"===e[0]);-1!==t&&(this.execute(...e[t]),e.splice(t,1)),this.queue=e,delete i.q}window[t]=function(){for(var t=arguments.length,i=Array(t),n=0;n0&&(this.queue.forEach(e=>this.execute(...e)),this.queue=[])}execute(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n{[].slice.call(document.querySelectorAll("[data-qualified-action]")).forEach(e=>{let t=e.dataset.qualifiedAction;if(!(0,c.S1)(h,t))return;let i=Object.keys(e.dataset).sort().reduce((t,i)=>{if(/^qualifiedArg/.test(i)){var n;t[Number(null==(n=/^qualifiedArg-([0-9])+/.exec(i))?void 0:n[1])||0]=e.dataset[i]}return t},[]),n=()=>this.execute(t,...i);e.addEventListener("click",n),this.callOnDispose(()=>e.removeEventListener("click",n))})},(0,s._)(this,f)[f]=()=>{[].slice.call(document.querySelectorAll("[data-qualified-smart-form]")).forEach(e=>{let{onsubmit:t}=e,n="true"===e.dataset.qualifiedSmartForm?"default":e.dataset.qualifiedSmartForm,r=e.dataset.qualifiedSmartFormTrigger;e.onsubmit=s=>{let o=!t||t.call(e,s);try{let e=[].slice.call(s.target.querySelectorAll("[data-qualified-field]")).reduce((e,t)=>{let{dataset:{qualifiedField:i},value:n,checked:r,type:s}=t;switch(s){case"checkbox":e[i]=r;break;case"radio":r&&(e[i]=n);break;case"password":break;default:n.trim()&&(e[i]=n)}return e},{});"submit"===r||"redirect"!==r&&(!1===o||s.defaultPrevented)||(0,i.f8)()?this.execute("sendSmartFormData",e,n):this.execute("saveSmartFormData",e,n)}catch(e){throw e}return o},this.callOnDispose(()=>e.onsubmit=t)})},this.handlers=t,this.queue=[],(0,s._)(this,m)[m](),(0,s._)(this,f)[f]()}}let v=g,b=["initPardotForm","initPardotFormThankYou","registerForm"],y=["initialize","handleEvents","handleMessengerEvents","handleWidgetEvents"];var _=(0,o._)("_forwardCall");class w extends v{determineTargetOrigin(){throw Error("Subclass did not implement.")}markReady(){this.determineTargetOrigin(),super.markReady()}constructor(e){super(e,{}),Object.defineProperty(this,_,{writable:!0,value:void 0}),(0,s._)(this,_)[_]=(e,t)=>{if(y.includes(e))return void console.warn("Qualified: Unsupported API call in iframe '"+e+"'");if(!this.targetOrigin)return void console.warn("Qualified: Could not determine parent origin");let i={source:"qualified",token:this.widget.config.token,args:[e].concat(t)};window.parent.postMessage(i,this.targetOrigin)};const t=d.reduce((e,t)=>{if("initialize"===t)e[t]=(e,t)=>{this.widget.init(e,t)};else if(b.includes(t)){var i=this;e[t]=function(){for(var e=arguments.length,n=Array(e),r=0;r{if(t.target instanceof HTMLFormElement&&t.target.id&&("pardot-form"===t.target.id||t.target.matches('form[action="'+e+'"]'))){let e=t.target.querySelector(p),i=null==e?void 0:e.value;i&&(this.execute("saveFormData",{email:i}),this.execute("emitFormFill","pardot"));let n=t.target,r=Object.fromEntries(new FormData(n));this.execute("parsePardotForm",n.outerHTML,r,i)}}),this.execute("logDebugEvent","api:initPardotForm","success",{isLandingPage:!1,formActionUrl:e})}initPardotFormThankYou(e){window.setTimeout(()=>{let t=!0,i=document.querySelector("template.qualified-thank-you");function n(){t&&i&&(t=!1,document.body.appendChild(i.content.cloneNode(!0)))}let r=!!i&&i.content.textContent&&/(?:top|parent)\.location(?:\.href)? *=/.test(i.content.textContent);this.execute("showExperienceForForm","pardot",{formActionUrl:e},r),i&&(r?(window.setTimeout(n,3e3),window.addEventListener("message",e=>{let{data:t}=e;(null==t?void 0:t.source)==="qualified"&&(null==t?void 0:t.message)==="done"&&(null==t?void 0:t.verb)==="showExperienceForForm"&&n()})):n())},500),this.execute("logDebugEvent","api:initPardotFormThankYou","success",{isLandingPage:!1,formActionUrl:e})}registerForm(e,t,i){void 0===t&&(t={}),void 0===i&&(i=null),window.addEventListener("submit",n=>{let r=null;if("string"==typeof e?r=document.querySelector(e):e instanceof HTMLFormElement&&(r=e),n.target!==r)return;let s=new FormData(n.target),o=Object.entries(t).reduce((e,t)=>{let[i,n]=t;return e[i]=s.get(n),e},{});if(this.handlers.saveFormData(o),i){n.preventDefault(),n.stopPropagation();try{i(o)}catch(e){console.error("Qualified: Error running altSubmitCallback",e)}}},{capture:!0})}}var A=__webpack_require__(8869),S=__webpack_require__(4464),x=__webpack_require__(1722),C=__webpack_require__(7668),T=__webpack_require__(8055),k=__webpack_require__.n(T),I=__webpack_require__(2550),O=__webpack_require__.n(I),F=__webpack_require__(3851),M=__webpack_require__(7050);let P=RegExp("https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)");var D=__webpack_require__(2504);let L="QualifiedForm-formControl",R="QualifiedForm-formLabel",N="QualifiedForm-formLabel--optional",B="QualifiedForm-formControl--textInput",U="QualifiedForm-formControl--textarea",j="QualifiedForm-formControl--select",z="QualifiedForm-formField--checkbox";class q{classNamesToString(e){return e.filter(Boolean).join(" ")}printError(e){console.log("[Qualified] QualifiedFormField: "+e)}toHtml(){let e="";switch(this.field.type){case"boolean":e=this.renderCheckboxControl();break;case"company":case"name":case"string":e=this.renderTextControl();break;case"decimal":e=this.renderNumberControl();break;case"picklist":e=this.renderPicklistControl();break;case"phone":e=this.renderPhoneControl();break;case"text":e=this.renderTextareaControl();break;default:this.printError("Unsupported control type: "+this.field.type)}let t=this.classNamesToString(["QualifiedForm-formField","boolean"===this.field.type?z:null]),i=this.renderLabel(),n='\n
\n '+e+"\n
\n ",r=this.renderErrorMessages();return('\n
\n '+("boolean"===this.field.type?[n,i,r].join(""):[i,n,r].join(""))+"\n
\n ").trim()}getFormControlId(){return"qualified-form-field-"+this.instanceId+"-id-"+this.field.fieldId}getFormControlName(){return this.fieldNamespace?this.fieldNamespace+"["+this.field.name+"]":this.field.name}renderLabel(){let e=this.field.optional?" (optional)":"";return"\n '+this.field.label+e+"\n "}renderErrorMessages(){return'\n \n '}renderInput(e){return'\n \n '}renderCheckboxControl(){let e=this.getFormControlName();return'\n \n \n '}renderNumberControl(){return this.renderInput("number")}renderPhoneControl(){return this.renderInput("tel")}renderPicklistControl(){return'\n \n "+(this.field.placeholder?'":"")+"\n "+(this.field.fieldValues||[]).map(e=>'").join("")+"\n \n "}renderTextControl(){return this.renderInput("text")}renderTextareaControl(){return'\n \n "}constructor(e,t={}){this.instanceId=q.instanceId++,this.field=e,t.fieldNamespace&&(this.fieldNamespace=t.fieldNamespace)}}q.instanceId=0;var H=((e=H||{})[e.EmailBusinessRequired="non_business"]="EmailBusinessRequired",e[e.EmailInvalid="invalid"]="EmailInvalid",e),V=((t={}).EmailPending="emailPending",t.EmailReady="emailReady",t.FollowUpQuestionsPending="followUpQuestionsPending",t.FollowUpQuestionsReady="followUpQuestionsReady",t.Success="success",t);class W extends HTMLElement{connectedCallback(){this.appendChild(this.template.content.cloneNode(!0)),this.setFormState("emailReady"),this.validateAttributes(),this.renderElements();let e=this.getElement("emailInput"),t=this.getElement("form");null==e||e.addEventListener("input",this.handleEmailInputInput),null==t||t.addEventListener("submit",this.handleFormSubmit),this.qualifiedFormApi=this.createQualifiedFormApi()}attributeChangedCallback(e,t,i){this.validateAttributes([e]),this.renderElements()}printError(e){console.error("[Qualified] Embedded form: "+e)}renderElements(){this.renderEmailInput(),this.renderSubmitButton(),this.renderSuccessMessage()}createQualifiedFormApi(){return null==this.formExperienceApiName?(this.printError("`formExperienceApiName` property is required"),null):new D.Dj({channel:this.channel,config:{validateBusinessEmail:"true"===this.validateBusinessEmail},formApiName:this.formExperienceApiName,iframeManager:this.iframeManager,source:"embedded"})}setOrRemoveAttribute(e,t){null!=t?this.setAttribute(e,t):this.removeAttribute(e)}get emailInputLabelText(){return this.getAttribute(W.EMAIL_INPUT_LABEL_TEXT_ATTRIBUTE)}set emailInputLabelText(e){this.setOrRemoveAttribute(W.EMAIL_INPUT_LABEL_TEXT_ATTRIBUTE,e)}get emailInputPlaceholderText(){return this.getAttribute(W.EMAIL_INPUT_PLACEHOLDER_TEXT_ATTRIBUTE)}set emailInputPlaceholderText(e){this.setOrRemoveAttribute(W.EMAIL_INPUT_PLACEHOLDER_TEXT_ATTRIBUTE,e)}get emailSubmitButtonInnerHtml(){return this.getAttribute(W.EMAIL_SUBMIT_BUTTON_INNER_HTML_ATTRIBUTE)}set emailSubmitButtonInnerHtml(e){this.setOrRemoveAttribute(W.EMAIL_SUBMIT_BUTTON_INNER_HTML_ATTRIBUTE,e)}get formControlCheckboxClassName(){return this.getAttribute(W.FORM_CONTROL_CHECKBOX_CLASS_NAME_ATTRIBUTE)}set formControlCheckboxClassName(e){this.setOrRemoveAttribute(W.FORM_CONTROL_CHECKBOX_CLASS_NAME_ATTRIBUTE,e)}get formControlTextareaClassName(){return this.getAttribute(W.FORM_CONTROL_TEXTAREA_CLASS_NAME_ATTRIBUTE)}set formControlTextareaClassName(e){this.setOrRemoveAttribute(W.FORM_CONTROL_TEXTAREA_CLASS_NAME_ATTRIBUTE,e)}get formControlTextInputClassName(){return this.getAttribute(W.FORM_CONTROL_TEXT_INPUT_CLASS_NAME_ATTRIBUTE)}set formControlTextInputClassName(e){this.setOrRemoveAttribute(W.FORM_CONTROL_TEXT_INPUT_CLASS_NAME_ATTRIBUTE,e)}get formControlFormLabelClassName(){return this.getAttribute(W.FORM_CONTROL_FORM_LABEL_CLASS_NAME_ATTRIBUTE)}set formControlFormLabelClassName(e){this.setOrRemoveAttribute(W.FORM_CONTROL_FORM_LABEL_CLASS_NAME_ATTRIBUTE,e)}get formControlFormLabelOptionalClassName(){return this.getAttribute(W.FORM_CONTROL_FORM_LABEL_OPTIONAL_CLASS_NAME_ATTRIBUTE)}set formControlFormLabelOptionalClassName(e){this.setOrRemoveAttribute(W.FORM_CONTROL_FORM_LABEL_OPTIONAL_CLASS_NAME_ATTRIBUTE,e)}get formControlSelectClassName(){return this.getAttribute(W.FORM_CONTROL_SELECT_CLASS_NAME_ATTRIBUTE)}set formControlSelectClassName(e){this.setOrRemoveAttribute(W.FORM_CONTROL_SELECT_CLASS_NAME_ATTRIBUTE,e)}get formExperienceApiName(){return this.getAttribute(W.FORM_EXPERIENCE_API_NAME_ATTRIBUTE)}set formExperienceApiName(e){this.setOrRemoveAttribute(W.FORM_EXPERIENCE_API_NAME_ATTRIBUTE,e)}get submitButtonClassName(){return this.getAttribute(W.SUBMIT_BUTTON_CLASS_NAME_ATTRIBUTE)}set submitButtonClassName(e){this.setOrRemoveAttribute(W.SUBMIT_BUTTON_CLASS_NAME_ATTRIBUTE,e)}get successMessageInnerHtml(){return this.getAttribute(W.SUCCESS_MESSAGE_INNER_HTML_ATTRIBUTE)}set successMessageInnerHtml(e){this.setOrRemoveAttribute(W.SUCCESS_MESSAGE_INNER_HTML_ATTRIBUTE,e)}get successRedirectUrl(){let e=this.getAttribute(W.SUCCESS_REDIRECT_URL_ATTRIBUTE);return null!=e&&P.test(e)?e:null}set successRedirectUrl(e){(null==e||P.test(e))&&this.setOrRemoveAttribute(W.SUCCESS_REDIRECT_URL_ATTRIBUTE,e)}get validateBusinessEmail(){return this.getAttribute(W.VALIDATE_BUSINESS_EMAIL_ATTRIBUTE)}set validateBusinessEmail(e){this.setOrRemoveAttribute(W.VALIDATE_BUSINESS_EMAIL_ATTRIBUTE,e)}get version(){return this.getAttribute(W.VERSION_ATTRIBUTE)}set version(e){this.setOrRemoveAttribute(W.VERSION_ATTRIBUTE,e)}validateAttributes(e){void 0===e&&(e=W.observedAttributes),e.includes(W.FORM_EXPERIENCE_API_NAME_ATTRIBUTE)&&(null==this.formExperienceApiName||""===this.formExperienceApiName)&&this.printError("The `"+W.FORM_EXPERIENCE_API_NAME_ATTRIBUTE+"` attribute is required"),e.includes(W.VALIDATE_BUSINESS_EMAIL_ATTRIBUTE)&&null!=this.validateBusinessEmail&&"true"!==this.validateBusinessEmail&&this.printError("Invalid `"+W.VALIDATE_BUSINESS_EMAIL_ATTRIBUTE+"` attribute value: "+this.validateBusinessEmail),e.includes(W.VERSION_ATTRIBUTE)&&(null==this.version||""===this.version?this.printError("The `q-version` attribute is required"):"0"!==this.version&&this.printError("Invalid `"+W.VERSION_ATTRIBUTE+"` attribute value: "+this.version))}getElement(e){let t;if("emailInput"===e?t=".QualifiedForm-emailFieldContainer ."+L:"emailInputLabel"===e?t=".QualifiedForm-emailFieldContainer .QualifiedForm-formLabel":"followUpQuestionsContainer"===e?t=".QualifiedForm-followUpQuestionsContainer":"form"===e?t=".QualifiedForm-form":"formErrorEmailBusinessRequired"===e?t=".QualifiedForm-formError--emailBusinessRequired":"formErrorEmailInvalid"===e?t=".QualifiedForm-formError--emailInvalid":"submitButton"===e?t="."+W.SUBMIT_BUTTON_CLASS_NAME:"successContainer"===e?t=".QualifiedForm-successContainer":"successMessage"===e&&(t=".QualifiedForm-successMessage"),null!=t)return this.querySelector(t);throw Error("Unknown element name: "+e)}getFormState(){let e=this.getAttribute(W.FORM_STATE_ATTRIBUTE);if(!Object.values(V).includes(e))throw Error("Unknown form state: "+e);return e}setFormState(e){let t=this.getElement("emailInput"),i=this.getElement("form"),n=this.getElement("followUpQuestionsContainer"),r=this.getElement("submitButton"),s=this.getElement("successContainer");this.setAttribute(W.FORM_STATE_ATTRIBUTE,e),t&&(t.disabled="emailPending"===e||"success"===e),n&&("followUpQuestionsReady"===e?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden","true")),i&&("success"===e?i.setAttribute("aria-hidden","true"):i.removeAttribute("aria-hidden")),r&&(r.disabled="emailPending"===e||"success"===e,("emailReady"===e||"followUpQuestionsPending"===e||"followUpQuestionsReady"===e)&&(r.innerHTML="Submit")),s&&(s.hidden="success"!==e)}renderEmailInput(){var e;let t=this.getElement("emailInput"),i=this.getElement("emailInputLabel");if(!t||!i)return;let n=this.formControlFormLabelClassName;null!=n&&(i.className=[R,...n.split(/\s+/)].join(" "));let r=this.formControlTextInputClassName,s="true"===this.validateBusinessEmail?"Business email":"Email",o=null!=(e=this.emailInputPlaceholderText)?e:s;null!=r&&(t.className=[L,B,...r.split(/\s+/)].join(" ")),t.setAttribute("placeholder",o)}renderSubmitButton(){let e=this.getElement("submitButton");if(!e)return;if(["emailPending","followUpQuestionsPending"].includes(this.getFormState())){let{color:t}=getComputedStyle((0,M.Vw)(e)||e);e.innerHTML="\n "+(0,M.Cw)(t,11)+'\n \n Loading…\n \n ';return}let t=this.submitButtonClassName;if(null!=t){let i=t.split(" ");e.className=[W.SUBMIT_BUTTON_CLASS_NAME,...i].join(" ")}let i=this.emailSubmitButtonInnerHtml;null!=i&&(e.innerHTML=i)}renderSuccessMessage(){let e=this.getElement("successMessage");if(!e)return;let t=this.successMessageInnerHtml;null!=t&&(e.innerHTML=t)}getFormData(){let e=new FormData(this.getElement("form")),t=Array.from(new Set(e.keys())).reduce((t,i)=>{if(i.startsWith("followUpQuestions[")){var n;let r=null!=(n=e.getAll(i).at(-1))?n:"";return t.concat([[i,r]])}return t},[]),i={email:e.get("email")};return t.length>0&&(i.followUpQuestions=t),i}applyFollowUpQuestionFormFieldClasses(e,t,i){var n;let r=null!=(n=null==i?void 0:i.split(/\s+/))?n:[];e.querySelectorAll("."+t).forEach(e=>{e.classList.add(...r)})}renderFollowUpQuestions(e){let{inputFields:t}=e,i=t.map(e=>new q(e,{fieldNamespace:"followUpQuestions"}).toHtml()).join(""),n=this.getElement("followUpQuestionsContainer");n&&(n.innerHTML=i,this.applyFollowUpQuestionFormFieldClasses(n,B,this.formControlTextInputClassName),this.applyFollowUpQuestionFormFieldClasses(n,U,this.formControlTextareaClassName),this.applyFollowUpQuestionFormFieldClasses(n,z,this.formControlCheckboxClassName),this.applyFollowUpQuestionFormFieldClasses(n,R,this.formControlFormLabelClassName),this.applyFollowUpQuestionFormFieldClasses(n,N,this.formControlFormLabelOptionalClassName),this.applyFollowUpQuestionFormFieldClasses(n,j,this.formControlSelectClassName))}showErrorMessage(e){let t,i;e===H.EmailBusinessRequired?(t=this.getElement("formErrorEmailBusinessRequired"),i=this.getElement("emailInput")):e===H.EmailInvalid&&(t=this.getElement("formErrorEmailInvalid"),i=this.getElement("emailInput")),t&&i?(t.removeAttribute("hidden"),i.setAttribute("aria-invalid","true")):this.printError("Unknown error key: "+e)}hideErrorMessages(){var e;for(let t of null!=(e=this.querySelectorAll("."+W.FORM_ERROR_CLASS_NAME))?e:[])t.setAttribute("hidden","true");this.querySelectorAll("[aria-invalid]").forEach(e=>{e.removeAttribute("aria-invalid")})}doSuccessStep(e){this.successRedirectUrl||this.setFormState("success"),this.triggerEvent("qualifiedFormSuccess",{formData:e}),this.successRedirectUrl&&(window.location.href=this.successRedirectUrl)}triggerEvent(e,t){let i=new CustomEvent(e,{bubbles:!0,detail:(0,S._)({formExperienceApiName:this.formExperienceApiName},t)});this.dispatchEvent(i)}constructor(...e){super(...e),this.instanceId=W.instanceId++,this.handleEmailInputInput=()=>{if("emailReady"===this.getFormState())return;let e=this.getElement("followUpQuestionsContainer");e&&(this.setFormState("emailReady"),setTimeout(()=>{e.innerHTML=""},500))},this.handleFormSubmit=async e=>{e.preventDefault();let t=this.getFormState();if("emailReady"===t)this.handleFormEmailSubmit(e);else if("followUpQuestionsReady"===t)this.handleFormFollowUpQuestionsSubmit(e);else throw Error("Invalid form state: "+t)},this.handleFormEmailSubmit=async e=>{let t=this.getFormData();if(null==t.email||null==this.qualifiedFormApi)return;this.triggerEvent("qualifiedFormEmailSubmit",{formData:t}),this.setFormState("emailPending"),this.hideErrorMessages();let i=this.qualifiedFormApi.submitEmail(t.email);if(i.success){let e=await i.result;e.form?(this.renderFollowUpQuestions(e.form),this.setFormState("followUpQuestionsReady")):this.doSuccessStep(t)}else this.showErrorMessage(i.error),this.setFormState("emailReady")},this.handleFormFollowUpQuestionsSubmit=async e=>{let t=this.getFormData(),i=t.followUpQuestions.map(e=>{let[,t]=e;return t});if(0===i.length||null==this.qualifiedFormApi)return;this.triggerEvent("qualifiedFormFollowUpQuestionsSubmit",{formData:t}),this.setFormState("followUpQuestionsPending"),this.hideErrorMessages();let n=this.qualifiedFormApi.submitFollowUpQuestions(i);n.success?this.doSuccessStep(t):n.errors&&(Object.entries(n.errors).forEach(e=>{let[t,i]=e,n=this.querySelector('[data-qualified-form-field-name="'+t+'"]'),r=null==n?void 0:n.querySelector("input, select"),s=null==n?void 0:n.querySelector(".QualifiedForm-formError--"+i.type);null==r||r.setAttribute("aria-invalid","true"),null==s||s.removeAttribute("hidden")}),this.setFormState("followUpQuestionsReady"))}}}W.instanceId=0,W.EMAIL_INPUT_LABEL_TEXT_ATTRIBUTE="q-email-input-label-text",W.EMAIL_INPUT_PLACEHOLDER_TEXT_ATTRIBUTE="q-email-input-placeholder-text",W.EMAIL_SUBMIT_BUTTON_INNER_HTML_ATTRIBUTE="q-email-submit-button-inner-html",W.FORM_CONTROL_CHECKBOX_CLASS_NAME_ATTRIBUTE="q-checkbox-class-name",W.FORM_CONTROL_FORM_LABEL_CLASS_NAME_ATTRIBUTE="q-form-label-class-name",W.FORM_CONTROL_FORM_LABEL_OPTIONAL_CLASS_NAME_ATTRIBUTE="q-form-label-optional-class-name",W.FORM_CONTROL_TEXTAREA_CLASS_NAME_ATTRIBUTE="q-textarea-class-name",W.FORM_CONTROL_TEXT_INPUT_CLASS_NAME_ATTRIBUTE="q-text-input-class-name",W.FORM_CONTROL_SELECT_CLASS_NAME_ATTRIBUTE="q-select-class-name",W.FORM_EXPERIENCE_API_NAME_ATTRIBUTE="q-form-experience-api-name",W.FORM_STATE_ATTRIBUTE="data-form-state",W.SUBMIT_BUTTON_CLASS_NAME_ATTRIBUTE="q-submit-button-class-name",W.SUCCESS_MESSAGE_INNER_HTML_ATTRIBUTE="q-success-message-inner-html",W.SUCCESS_REDIRECT_URL_ATTRIBUTE="q-success-redirect-url",W.VALIDATE_BUSINESS_EMAIL_ATTRIBUTE="q-validate-business-email",W.VERSION_ATTRIBUTE="q-version",W.FORM_ERROR_CLASS_NAME="QualifiedForm-formError",W.SUBMIT_BUTTON_CLASS_NAME="QualifiedForm-submitButton",W.observedAttributes=[W.FORM_CONTROL_CHECKBOX_CLASS_NAME_ATTRIBUTE,W.FORM_CONTROL_FORM_LABEL_CLASS_NAME_ATTRIBUTE,W.FORM_CONTROL_FORM_LABEL_OPTIONAL_CLASS_NAME_ATTRIBUTE,W.FORM_CONTROL_TEXTAREA_CLASS_NAME_ATTRIBUTE,W.FORM_CONTROL_TEXT_INPUT_CLASS_NAME_ATTRIBUTE,W.FORM_CONTROL_SELECT_CLASS_NAME_ATTRIBUTE,W.EMAIL_INPUT_LABEL_TEXT_ATTRIBUTE,W.EMAIL_INPUT_PLACEHOLDER_TEXT_ATTRIBUTE,W.EMAIL_SUBMIT_BUTTON_INNER_HTML_ATTRIBUTE,W.FORM_EXPERIENCE_API_NAME_ATTRIBUTE,W.SUBMIT_BUTTON_CLASS_NAME_ATTRIBUTE,W.SUCCESS_MESSAGE_INNER_HTML_ATTRIBUTE,W.SUCCESS_REDIRECT_URL_ATTRIBUTE,W.VALIDATE_BUSINESS_EMAIL_ATTRIBUTE,W.VERSION_ATTRIBUTE,W.FORM_STATE_ATTRIBUTE];let Q="qualified-form";async function G(e){var t,i,n,r,s,o,a,l,c,u,d,h,p;await window.customElements.whenDefined(Q);let m=document.createElement(Q);return m.emailInputLabelText=null!=(t=e.emailInputLabelText)?t:null,m.emailInputPlaceholderText=null!=(i=e.emailInputPlaceholderText)?i:null,m.emailSubmitButtonInnerHtml=null!=(n=e.emailSubmitButtonInnerHtml)?n:null,m.formControlFormLabelClassName=null!=(r=e.formControlFormLabelClassName)?r:null,m.formControlFormLabelOptionalClassName=null!=(s=e.formControlFormLabelOptionalClassName)?s:null,m.formControlCheckboxClassName=null!=(o=e.formControlCheckboxClassName)?o:null,m.formControlTextInputClassName=null!=(a=e.formControlTextInputClassName)?a:null,m.formControlTextareaClassName=null!=(l=e.formControlTextareaClassName)?l:null,m.formControlSelectClassName=null!=(c=e.formControlSelectClassName)?c:null,m.formExperienceApiName=e.formExperienceApiName,m.submitButtonClassName=null!=(u=e.submitButtonClassName)?u:null,m.successMessageInnerHtml=null!=(d=e.successMessageInnerHtml)?d:null,m.successRedirectUrl=null!=(h=e.successRedirectUrl)?h:null,m.validateBusinessEmail=null!=(p=e.validateBusinessEmail)?p:null,m.version=e.version,e.onEmailSubmit&&m.addEventListener("qualifiedFormEmailSubmit",e.onEmailSubmit),e.onSuccess&&m.addEventListener("qualifiedFormSuccess",e.onSuccess),m}var $=__webpack_require__(516),K=__webpack_require__(4079),Y=__webpack_require__(759);__webpack_require__(3673),__webpack_require__(3375);let J=(e,t,i)=>{void 0===i&&(i=!1);let n=X(e),r=X(t),s=n.host===r.host,o=n.pathname===r.pathname;return s&&(i||o)},X=e=>{let t="string"==typeof e?new URL(e):e;return t.host=t.host.replace(/^(https?:\/\/)?(www\.)?/i,"").toLowerCase(),t.pathname=t.pathname.replace(/\/$/,""),t};var Z=__webpack_require__(71);__webpack_require__(6540);let ee=__webpack_require__.p+"7271f3433ed82fc7f56adcd9e30275f4.svg",et=__webpack_require__.p+"41842993ec71d6628e4949e9a22b146b.svg",ei="debug_store",en="submitted_store",er="debugLink",es="16px",eo=e=>"calc(50% - "+e+"/2 + "+es+")",ea={padding:es,position:"fixed",maxWidth:"400px",bottom:"0",fontSize:"16px",backgroundColor:"#6558FF",borderRadius:"8px 8px 0px 0px",left:eo("400px"),zIndex:0x7fffffff},el={paddingLeft:es,paddingRight:es,color:"#FFFFFF",fontFamily:"sans-serif",lineHeight:"1.5"},ec={height:"12px",paddingLeft:es,alignSelf:"center",width:"30px"},eu={height:"25px",filter:"invert(1)",width:"21px"},ed=(e,t,i)=>{if(e.style.maxWidth="490px",e.style.left=eo("490px"),t.innerText="Form submission detected",!document.getElementById(er)){let e,i=(Object.assign((e=document.createElement("div")).style,el),e.style.textDecoration="underline",e.style.fontWeight="600",e.innerText="View debug report",e.id=er,e);i.addEventListener("click",()=>{var e,t;let i,n,r;alert(((i=[]).push("Results from your form submission\n"),n=null!=(e=eh.getApiMessage("saveFormData"))?e:'[Error] "saveFormData" was not called.',i.push(n),r=null!=(t=eh.getApiMessage("showFormExperience"))?t:'[Error] "showFormExperience" was not called.',i.push(r),i.push(""),n.includes("[Error]")||r.includes("[Error]")?i.push("There are problems with this form setup. Please address the issues above and try again."):i.push("Congratulations! This form is successfully set up. If the Experience is still not appearing, please ask your Qualified admin to make sure that the Experience is enabled and properly configured."),i).join("\n"))}),t.insertAdjacentElement("afterend",i)}};class eh{}eh.initializeDebugMode=()=>{(0,Z.C6)(ei,{startTime:Date.now(),apiCalls:{}})},eh.exitDebugMode=()=>{(0,Z.C6)(ei,void 0)},eh.isInDebugMode=()=>{let e=(0,Z.yw)(ei);return e&&Date.now()-e.startTime<18e5},eh.setApiMessage=(e,t,i)=>{let n=(0,Z.yw)(ei);n&&(n.apiCalls[e]="["+t+"] "+i,(0,Z.C6)(ei,n))},eh.getApiMessage=e=>{let t=(0,Z.yw)(ei);return t?t.apiCalls[e]:null};class ep{constructor(){this.generateTraceId=ef(16),this.generateSpanId=ef(8)}}let em=Array(32);function ef(e){return function(){for(let t=0;t<2*e;t++)em[t]=Math.floor(16*Math.random())+48,em[t]>=58&&(em[t]+=39);return String.fromCharCode.apply(null,em.slice(0,2*e))}}var eg=__webpack_require__(9843),ev=__webpack_require__.n(eg),eb=__webpack_require__(2194),ey=__webpack_require__.n(eb),e_=__webpack_require__(7377),ew=(0,o._)("_config"),eE=(0,o._)("_widgetId"),eA=(0,o._)("_visitorId");let eS=new class{setConfig(e){(0,s._)(this,ew)[ew]=e}setVisitorId(e){(0,s._)(this,eA)[eA]=e}setWidgetId(e){(0,s._)(this,eE)[eE]=e}resourceUrl(e,t){let i=(0,s._)(this,ew)[ew].host+"/w/1/"+(0,s._)(this,ew)[ew].token+"/"+e;return t&&(i+="?"+new URLSearchParams(ey()(t,ev())).toString()),i}serverLog(e){let{type:t="log",message:i,extra:n={}}=e;(0,s._)(this,ew)[ew].host&&(0,s._)(this,ew)[ew].token&&this.sendEvent("visitor_events",{params:{wu:(0,s._)(this,eE)[eE],uuid:(0,s._)(this,eA)[eA]},body:{event:i,type:t,extra:n}})}recordTrace(e){(0,s._)(this,ew)[ew].host&&(0,s._)(this,ew)[ew].token&&this.sendEvent("events/trace",{body:(0,S._)({},e,{widget_id:(0,s._)(this,eE)[eE],visitor_id:(0,s._)(this,eA)[eA]})})}async sendEvent(e,t){let{params:i,body:n}=t;try{let t=await fetch(this.resourceUrl(e,i),{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(n)});if(!t.ok)throw Error("Failed to send event "+e+": "+t.status+" "+t.statusText)}catch(e){var r;null==(r=(0,e_.N)())||r.captureException(e)}}constructor(e){Object.defineProperty(this,ew,{writable:!0,value:void 0}),Object.defineProperty(this,eE,{writable:!0,value:void 0}),Object.defineProperty(this,eA,{writable:!0,value:void 0}),(0,s._)(this,ew)[ew]=e,(0,s._)(this,eE)[eE]=void 0,(0,s._)(this,eA)[eA]=void 0}}({}),ex=null;function eC(e,t){var i={parent:ex,vars:e};let n=ex;ex=i;try{return t()}finally{ex=n}}class eT{startSpan(e,t,i){let n=new ej(e,t,null==i?void 0:i.id);return n.setAttributes(t),this.spans.push(n),n}startActiveSpan(e,t,i,n){let r=this.startSpan(e,t,i);return n(r),r}async startActiveSpanAsync(e,t,i,n){let r=this.startSpan(e,t,i);return await n(r),r}recordTimedSpan(e,t,i,n,r){let s=new ez(e,t,null==i?void 0:i.id,n,r);return this.spans.push(s),s}removeSpan(e){this.spans=this.spans.filter(t=>t!==e)}reset(){this.spans=[]}constructor(){this.spans=[]}}class ek{}ek.UNSET=0,ek.OK=1,ek.ERROR=2;var eI=(0,o._)("_tracer"),eO=(0,o._)("_hasCalledFlush"),eF=(0,o._)("_hasRootSpan"),eM=(0,o._)("_samplingProbability"),eP=(0,o._)("_samplingDecision");class eD{startActiveSpan(){for(var e=arguments.length,t=Array(e),i=0;i{await eR(i?{traceId:i.traceId,parentSpan:e,telemetry:i.telemetry}:void 0,()=>n(e))})}startSpan(){for(var e=arguments.length,t=Array(e),i=0;i({id:e.id,name:e.name,parentSpanId:e.parentSpanId,attributes:e.attributes,status:e.status,startTime:e.startTime,endTime:e.endTime}))})}constructor(e=!1,t){Object.defineProperty(this,eI,{writable:!0,value:void 0}),Object.defineProperty(this,eO,{writable:!0,value:void 0}),Object.defineProperty(this,eF,{writable:!0,value:void 0}),Object.defineProperty(this,eM,{writable:!0,value:void 0}),Object.defineProperty(this,eP,{writable:!0,value:void 0}),(0,s._)(this,eI)[eI]=new eT,(0,s._)(this,eF)[eF]=e,(0,s._)(this,eM)[eM]=t,(0,s._)(this,eO)[eO]=!1}}let eL=new eD(!1,.001);function eR(e,t){return e?eC({telemetryCtx:e},t):t()}function eN(){var e="telemetryCtx";let t=ex;for(;t;){if(e in t.vars)return t.vars[e];t=t.parent}}function eB(e){var t,i;if(e.traceId&&(null==(t=e.parentSpan)?void 0:t.id))return"00-"+e.traceId+"-"+(null==(i=e.parentSpan)?void 0:i.id)+"-"+(e.telemetry.samplingDecision?"01":"00")}class eU{get id(){return this._id}get name(){return this._name}get parentSpanId(){return this._parentSpanId}get attributes(){return this._attributes}get status(){return this._status}get startTime(){return this._startTime}get endTime(){return this._endTime}setAttributes(e){if(e&&0!==Object.keys(e).length)for(let[t,i]of Object.entries(e))i&&this.setAttribute(t,i)}setAttribute(e,t){this._attributes[e]=t}setStatus(e,t){this._status={code:e,message:t}}constructor(e,t){this._status={code:ek.UNSET,message:""},this._id=new ep().generateSpanId(),this._name=e,this._parentSpanId=t,this._startTime=0,this._endTime=0,this._attributes={}}}class ej extends eU{end(){if(0!==this.endTime)throw Error("end() already called on span.");this._endTime=performance.now()}constructor(e,t,i){super(e,i),this.setAttributes(t),this._startTime=performance.now()}}class ez extends eU{constructor(e,t,i,n,r){super(e,i),this.setAttributes(t),this._startTime=n,this._endTime=r}}var eq=__webpack_require__(7888);let eH={BUTTON_CLICK:{name:"Visitor: Button Click",samplingProbability:1},WAIT_FOR_LIGHTBOX_LOADING_SPINNER:{name:"System: Wait for lightbox loading spinner",samplingProbability:1}},eV={SUBMIT_FORM:{name:"Visitor: Submit Form",samplingProbability:1}};(0,S._)({},eH,eV,{SEND_CHAT_MESSAGE:{name:"Visitor: Send Chat Message",samplingProbability:1},CHAT_WAITING_RESPONSE:{name:"Visitor: Chat waiting response",samplingProbability:1},CHAT_MESSAGE_ACK:{name:"System: Chat message ack",samplingProbability:1}});class eW extends(0,$.j)(class{}){constructor(e,t,i,n={}){var r;super(),this.span=e,this.store=t,this.parentInstance=i,this.attributes=n,this.childInstances=new Set,this.childStores=new Set,this.telemetry=null!=(r=null==i?void 0:i.telemetry)?r:new eD(!0,e.samplingProbability),this.telemetrySpan=this.telemetry.startSpan(e.name,n,(null==i?void 0:i.telemetrySpan)||null)}}class eQ extends(0,$.j)(class{}){static getInstance(){var e;return this.instance=null!=(e=this.instance)?e:new eQ}startSpan(e,t){let{parentSpan:i,attributes:n={},suppressErrors:r=eQ.DEFAULT_SUPPRESS_ERRORS}=void 0===t?{}:t;try{if(this.map.has(e))throw Error("Attempted to start span "+e.name+" but it was already started.");let t=this.getParentInstance(i);if(i&&!t)throw Error("Attempted to start span "+e.name+" but parent span "+(null==i?void 0:i.name)+" was not started.");this.startInstance(e,t,(0,S._)({},this.attributes,n))}catch(e){this.handleError(e,r)}}finishSpan(e,t){let{error:i=!1,attributes:n={},suppressErrors:r=eQ.DEFAULT_SUPPRESS_ERRORS}=void 0===t?{}:t;try{let t=this.map.get(e);if(!t)throw Error("Attempted to finish span "+e.name+" but it was not started.");this.endInstance(t,{error:i,attributes:n})}catch(e){this.handleError(e,r)}}cancelSpan(e,t){void 0===t&&(t=!1);try{let i=this.map.get(e);if(!i&&t)throw Error("Attempted to cancel span "+e.name+" but it was not started.");i&&this.cancelInstance(i)}catch(e){this.handleError(e,eQ.DEFAULT_SUPPRESS_ERRORS)}}finishSpans(e,t){void 0===t&&(t={});var{suppressErrors:i=eQ.DEFAULT_SUPPRESS_ERRORS}=t,n=(0,eq._)(t,["suppressErrors"]);try{let t=[];for(let r of e)try{this.finishSpan(r,(0,S._)({suppressErrors:i},n))}catch(e){t.push(e)}t.length>0&&this.handleError(AggregateError(t),i)}catch(e){this.handleError(e,i)}}createScope(e){let{parentSpan:t,attributes:i={},suppressErrors:n=eQ.DEFAULT_SUPPRESS_ERRORS}=void 0===e?{}:e;try{let e=this.getParentInstance(t);if(t&&!e)throw Error("Attempted to create scope with parent span "+(null==t?void 0:t.name)+" but it was not started.");let n=new eQ(e,i);return e&&e.childStores.add(n),n}catch(t){this.handleError(t,n);let e=new eQ;return e.dispose(),e}}getParentInstance(e){return e?this.map.get(e):this.storeParentInstance}startInstance(e,t,i){void 0===i&&(i={});let n=new eW(e,this,t,i);t&&t.childInstances.add(n),this.map.set(e,n)}endInstance(e,t){let{error:i,attributes:n}=void 0===t?{}:t;for(let t of[...e.childInstances])this.endInstance(t,{error:i,attributes:n});e.childInstances.clear(),this.disposeStores(e),this.endSpan(e.telemetrySpan,i,n),e.parentInstance||e.telemetry.flush({}),this.removeInstance(e)}endSpan(e,t,i){i&&e.setAttributes(i),t?e.setStatus(ek.ERROR,""):e.setStatus(ek.OK,""),e.end()}cancelInstance(e){for(let t of[...e.childInstances])this.cancelInstance(t);e.childInstances.clear(),this.disposeStores(e),e.parentInstance?e.telemetry.removeSpan(e.telemetrySpan):e.telemetry.reset(),this.removeInstance(e)}disposeStores(e){for(let t of[...e.childStores])t.dispose();e.childStores.clear()}removeInstance(e){var t;null==(t=e.parentInstance)||t.childInstances.delete(e),e.store.map.delete(e.span),e.dispose()}handleError(e,t){if(void 0===t&&(t=eQ.DEFAULT_SUPPRESS_ERRORS),t)try{var i;null==(i=(0,e_.N)())||i.captureException(e)}catch(e){}else throw e}constructor(e,t={}){super(),this.storeParentInstance=e,this.attributes=t,this.map=new Map}}eQ.instance=null,eQ.DEFAULT_SUPPRESS_ERRORS=!0,(0,x.Cg)([$.H,(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",["undefined"==typeof SpanType?Object:SpanType,"undefined"==typeof TracingStartOptions?Object:TracingStartOptions]),(0,x.Sn)("design:returntype",void 0)],eQ.prototype,"startSpan",null),(0,x.Cg)([$.H,(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",["undefined"==typeof SpanType?Object:SpanType,"undefined"==typeof TracingFinishOptions?Object:TracingFinishOptions]),(0,x.Sn)("design:returntype",void 0)],eQ.prototype,"finishSpan",null),(0,x.Cg)([$.H,(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",["undefined"==typeof SpanType?Object:SpanType,void 0]),(0,x.Sn)("design:returntype",void 0)],eQ.prototype,"cancelSpan",null),(0,x.Cg)([$.H,(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",[Array,"undefined"==typeof TracingFinishOptions?Object:TracingFinishOptions]),(0,x.Sn)("design:returntype",void 0)],eQ.prototype,"finishSpans",null),(0,x.Cg)([$.H,(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",["undefined"==typeof TracingStartOptions?Object:TracingStartOptions]),(0,x.Sn)("design:returntype",Object)],eQ.prototype,"createScope",null);let eG=eQ.getInstance();var e$=__webpack_require__(8414),eK=(0,o._)("_telemetry"),eY=(0,o._)("_flushed"),eJ=(0,o._)("_slowTimeout"),eX=(0,o._)("_initSpan"),eZ=(0,o._)("_traceId"),e0=(0,o._)("_rootSpanId"),e1=(0,o._)("_flush");function e2(e){clearTimeout((0,s._)(this,eJ)[eJ]),(0,s._)(this,eY)[eY]=!0,(0,s._)(this,eX)[eX].end(),(0,s._)(this,eK)[eK].flush({rootAttributes:{loadTimeoutExpired:e},traceId:(0,s._)(this,eZ)[eZ],rootSpanId:(0,s._)(this,e0)[e0]})}let e3=new class{get telemetry(){return(0,s._)(this,eK)[eK]}get initSpan(){return(0,s._)(this,eX)[eX]}get traceId(){return(0,s._)(this,eZ)[eZ]}get rootSpanId(){return(0,s._)(this,e0)[e0]}startSlowTimeout(){(0,s._)(this,eJ)[eJ]=setTimeout(()=>{(0,s._)(this,e1)[e1](!0)},3e4)}endBootstrap(){(0,s._)(this,eY)[eY]||(0,s._)(this,e1)[e1](!1)}constructor(e){Object.defineProperty(this,e1,{value:e2}),Object.defineProperty(this,eK,{writable:!0,value:void 0}),Object.defineProperty(this,eY,{writable:!0,value:void 0}),Object.defineProperty(this,eJ,{writable:!0,value:void 0}),Object.defineProperty(this,eX,{writable:!0,value:void 0}),Object.defineProperty(this,eZ,{writable:!0,value:void 0}),Object.defineProperty(this,e0,{writable:!0,value:void 0}),(0,s._)(this,eK)[eK]=e,(0,s._)(this,eY)[eY]=!1,(0,s._)(this,eX)[eX]=(0,s._)(this,eK)[eK].startSpan("Init WidgetBootstrap",{},null),(0,s._)(this,eZ)[eZ]=(0,e$.v4)().replace(/-/g,""),(0,s._)(this,e0)[e0]=(0,e$.v4)().replace(/-/g,"").slice(0,16)}}(eL);class e4 extends v{markReady(){super.markReady();let e=new URLSearchParams(document.location.search);if(e.has("q_showExperience")){let t=e.get("q_showExperience");this.execute("showExperience",t)}if(e.has("q_pardotFormSubmitted")){let t=e.get("q_pardotFormSubmitted");this.execute("pardotFormSubmitted",t)}window.addEventListener("message",e=>{let{data:t,origin:i,source:n}=e;(null==t?void 0:t.source)==="qualified"&&(null==t?void 0:t.token)===this.widget.config.token&&Array.isArray(t.args)&&this.widget.isAllowedOrigin(i)&&"initialize"!==t.args[0]&&(this.execute(...t.args),null==n||n.postMessage({source:"qualified",token:this.widget.config.token,message:"done",verb:((null==t?void 0:t.args)||[null])[0]},{targetOrigin:i}))})}constructor(e){super(e,{initialize:(e,t)=>{eR({traceId:e3.traceId,parentSpan:e3.initSpan,telemetry:e3.telemetry},()=>{this.widget.init(e,t)}),this.getIdentityQueue=[]},teardown:()=>{this.widget.onTeardown()},open:()=>{this.widget.initialized.then(()=>this.widget.open())},initPardotForm:e=>{window.addEventListener("submit",t=>{if(t.target instanceof HTMLFormElement&&t.target.id&&("pardot-form"===t.target.id||t.target.matches('form[action="'+e+'"]'))){let i=t.target.querySelector(p),n=null==i?void 0:i.value;if(n){let i=t.target,r=Object.fromEntries(new FormData(i));this.execute("parsePardotFormForLandingPage",i.outerHTML,r,n,e),this.execute("emitFormFill","pardot")}}}),this.widget.debugState.logEvent("api:initPardotForm","success",{isLandingPage:!0,formActionUrl:e})},initPardotFormThankYou:e=>{this.widget.debugState.logEvent("api:initPardotFormThankYou","success",{isLandingPage:!0,formActionUrl:e})},pardotFormSubmitted:e=>{void 0===e&&(e="default"),this.tracker.initialized?this.widget.initialized.then(()=>this.tracker.handlePardotFormSubmitted(e)):this.tracker.setInitializationParams({bot_api_name:e}),this.widget.debugState.logEvent("api:saveFormData","success",{botApiName:e})},parsePardotForm:(e,t,i)=>{if(!e||!t)return void this.widget.debugState.logEvent("api:parsePardotForm","error",{form:e,formData:t,email:i},"Failed to parse Pardot form. Form: "+e+", formData: "+t);let n=document.createElement("div");n.innerHTML=e;let r=n.querySelector("form"),s=this.widget.excludeLongFieldValue(t,"pardot",r);s&&s.email===i?(this.visitor.setFormData(s),this.widget.debugState.logEvent("api:parsePardotForm","success",{email:i})):this.widget.debugState.logEvent("api:parsePardotForm","error",{incomingEmail:s.email,correctEmail:i},"Failed to parse and get the correct field values from the Pardot form. Got "+s.email+", while the correct email is "+i)},parsePardotFormForLandingPage:(e,t,i,n)=>{if(!e||!t)return void this.widget.debugState.logEvent("api:parsePardotFormForLandingPage","error",{form:e,formData:t,email:i,formActionUrl:n},"Failed to parse Pardot form. Form: "+e+", formData: "+t);let r=document.createElement("div");r.innerHTML=e;let s=r.querySelector("form"),o=this.widget.excludeLongFieldValue(t,"pardot",s);o&&o.email===i?(this.visitor.setFormExperienceDataWithExpiry({formType:"pardot",formData:(0,S._)({},o,{formActionUrl:n,formEmail:i})},5e3),this.widget.debugState.logEvent("api:parsePardotFormForLandingPage","success",{email:i})):(this.widget.debugState.logEvent("api:parsePardotFormForLandingPage","error",{incomingEmail:o.email,correctEmail:i},"Failed to parse and get the correct field values from the Pardot form on landing page. Got "+o.email+", while the correct email is "+i),this.visitor.setFormExperienceDataWithExpiry({formType:"pardot",formData:{formActionUrl:n,formEmail:i}},5e3))},saveFormData:e=>{this.visitor.setFormData(e),e.email?this.widget.debugState.logEvent("api:saveFormData","success",{fieldValues:e}):this.widget.debugState.logEvent("api:saveFormData","error",{},'"saveFormData" was called but no email was provided.')},saveSmartFormData:(e,t)=>{void 0===t&&(t="default"),this.visitor.setSmartFormData(e,t),this.widget.debugState.logEvent("api:saveSmartFormData","success",{fieldValues:e,botApiName:t})},sendSmartFormData:(e,t)=>{void 0===t&&(t="default"),this.widget.initialized.then(()=>this.tracker.handleSmartFormSubmitted(e,t)),this.widget.debugState.logEvent("api:sendSmartFormData","success",{fieldValues:e,botApiName:t})},showExperience:(e,t,i)=>{void 0===t&&(t=!1),void 0===i&&(i=!0);let n=t?"collapsed":"expanded";i&&(this.tracker.config.hasMeetingBookerExperienceBuilder?this.iframeManager.showLightboxLoading():t||this.widget.initialized.then(()=>{this.iframeManager.showMessengerLoading()})),this.tracker.initialized?this.widget.initialized.then(()=>this.tracker.showExperience(e,n)):this.tracker.setInitializationParams({bot_api_name:e,bot_initial_client_state:n}),this.widget.debugState.logEvent("api:showExperience","success",{botApiName:e,startCollapsed:t,hasMeetingBookerExperienceBuilder:this.tracker.config.hasMeetingBookerExperienceBuilder})},registerForm:(e,t,i)=>{void 0===t&&(t={}),void 0===i&&(i=null),this.widget.initialized.then(()=>{window.addEventListener("submit",n=>{let r=null;if("string"==typeof e?r=document.querySelector(e):e instanceof HTMLFormElement&&(r=e),n.target!==r)return;let s=new FormData(n.target),o=Object.entries(t).reduce((e,t)=>{let[i,n]=t;return e[i]=s.get(n),e},{});if(this.visitor.setFormData(o),i){n.preventDefault(),n.stopPropagation();try{i(o)}catch(e){console.error("Qualified: Error running altSubmitCallback",e)}}},{capture:!0})}),this.widget.debugState.logEvent("api:registerForm","success",{formElementOrSelector:e.toString(),fieldMappings:t})},showForm:async(e,t)=>{if(!this.tracker.config.hasWebsiteEmbeddedForms)return void this.widget.debugState.logEvent("api:showForm","error",{botApiName:e,clientConfig:t},"`showForm` was called but `website_embedded_forms` feature flag is not enabled");let i=document.querySelectorAll(t.target);i.length>1&&this.widget.debugState.logEvent("api:showForm","error",{botApiName:e,clientConfig:t},"Found "+i.length+" target elements for selector, but expected 1: `"+t.target+"`");let n=i[0];if(!n)return void this.widget.debugState.logEvent("api:showForm","error",{botApiName:e,clientConfig:t},"Target element not found: `"+t.target+"`");let r=new D.Dj({channel:this.channel,formApiName:e,iframeManager:this.iframeManager,source:"embedded"}),s=await r.getFormConfig();if(s.success){let i=s.qualifiedFormConfig,r=await G((0,S._)({formExperienceApiName:e},t,{successRedirectUrl:void 0,validateBusinessEmail:i.validateBusinessEmail?"true":void 0}));n.append(r)}else this.widget.debugState.logEvent("api:showForm","error",{botApiName:e,clientConfig:t},"Failed to get form config for form experience `"+e+"`. Error: "+s.error)},showFormExperience:(e,t)=>{var i,n,r;void 0===t&&(t={formDestinations:null});let s=(null==(i=this.visitor.formData)?void 0:i.fieldValues)||(null==(n=this.visitor.smartFormData)?void 0:n.fieldValues);if(!s)return void this.widget.debugState.logEvent("api:showFormExperience","error",{botApiName:e,formDestinations:t.formDestinations},'"showFormExperience" was called but no form data was found. Not triggering the form experience.');if(this.iframeManager.showLightboxLoading(),eh.isInDebugMode()){let i;i=Array.isArray(t.formDestinations)&&t.formDestinations.length>0?" with the following form destination(s): "+t.formDestinations.join(", "):" with no form destinations provided",eh.setApiMessage("showFormExperience","Success",'"showFormExperience" was called successfully for '+e+i+".")}if(this.tracker.initialized)this.widget.initialized.then(()=>this.tracker.showFormExperience(e,t.formDestinations));else{let i={bot_api_name:e,form_destinations:t.formDestinations};s&&(i.smart_form={field_values:s}),this.tracker.setInitializationParams(i)}let o=(null==(r=t.formDestinations)?void 0:r.join(","))||"none";this.widget.debugState.logEvent("api:showFormExperience","success",{botApiName:e,formDestinations:t.formDestinations},'"showFormExperience" was called successfully for '+e+" with form destinations ["+o+"]")},showExperienceForForm:(e,t,i)=>{var n,r,s,o,a;(void 0===i&&(i=!1),this.widget.config.hasSmartForms)?t.formActionUrl&&!this.widget.config.formBotTriggers.pardot.includes(null==(n=t.formActionUrl)?void 0:n.replace(/^https?:\/\//,""))?this.widget.debugState.logEvent("api:showExperienceForForm","error",{formType:e,formData:t,showOnRedirect:i},'"showExperienceForForm" was called but "formData.formActionUrl" is not in the list of configured triggers'):("pardot"===e&&((t=(0,S._)({},t,null==(r=this.visitor.formData)?void 0:r.fieldValues)).formEmail=t.formEmail||(null==(o=this.visitor.formData)||null==(s=o.fieldValues)?void 0:s.email)),i?(window.addEventListener("beforeunload",()=>{this.visitor.setFormExperienceDataWithExpiry({formType:e,formData:t})}),window.postMessage({source:"qualified",token:this.widget.config.token,message:"done",verb:"showExperienceForForm"},window.location.origin)):this.tracker.initialized?(this.iframeManager.showLightboxLoading(),this.widget.initialized.then(()=>this.tracker.showExperienceForForm(e,t))):(this.iframeManager.showLightboxLoading(),this.tracker.setInitializationParams({smart_form:{form_type:e,field_values:{email:t.formEmail},form_data:{form_email:t.formEmail,form_action_url:null==(a=t.formActionUrl)?void 0:a.replace(/^https?:\/\//,""),raw:t,form_id:t.formId}}})),this.widget.debugState.logEvent("api:showExperienceForForm","success",{formType:e,formData:t,showOnRedirect:i})):this.widget.debugState.logEvent("api:showExperienceForForm","error",{formType:e,formData:t,showOnRedirect:i},'"showExperienceForForm" was called but "smart_forms" flag is not enabled')},getIdentity:e=>{this.getIdentityQueue.push(e),this.channel.initStateReceived?this.tracker.getIdentity():this.channel.once("initState",this.tracker.getIdentity),this.subscribedToGetIdentity||(this.subscribedToGetIdentity=!0,this.channel.emitter.on("received",(e,t)=>{if("getIdentity"===e)try{this.getIdentityQueue.forEach(e=>{e(t)}),this.getIdentityQueue=[]}catch(e){console.error("Qualified: Error in the given getIdentity callback.",e)}}))},handleEvents:e=>{this.channel.emitter.on("received",(t,i)=>{if("conversationEvent"===t)try{e(i.name,i.data),this.widget.serverLog({message:"handleEvents event: "+i.name,type:"log",extra:{api_method:"handleEvents",api_event:i.name}})}catch(e){console.error("Qualified: Error in event handler",e)}if("pageViewActivityEvent"===t)try{e(i.name,i.data),this.widget.serverLog({message:"handleEvents event: "+i.name,type:"log",extra:{api_method:"handleEvents",api_event:i.name}})}catch(e){console.error("Qualified: Error in event handler",e)}})},handleMessengerEvents:e=>{this.iframeManager.addMessengerEventsListener(e)},handleWidgetEvents:e=>{this.widget.addWidgetEventsListener(e)},identify:e=>{this.tracker.initialized?this.tracker.setFieldValues(e):this.tracker.setInitializationParams({field_values:e}),this.widget.debugState.logEvent("api:identify","success",{fieldValues:e})},page:()=>{this.tracker.createPageView({singlePageApp:!0,reconnecting:!1,rebroadcast:!1})},endExperience:()=>{this.widget.endExperience()},setCookieConsent:e=>{!0===e||!1===e?(this.widget.setCookieConsent(e),!0===e&&this.channel.send({event:"cookieConsentGiven",payload:{}})):console.error("Qualified: setCookieConsent must be called with a boolean value.")},emitFormFill:e=>{this.widget.initialized.then(()=>this.tracker.pageViewActivityEmitter.emitFormFill({formType:e}))},submitEmbeddedForm:e=>{let{email:t,formExperienceApiName:i}=e;this.tracker.config.hasWebsiteEmbeddedForms?(this.channel.send({event:"submitEmbeddedForm",payload:{bot_api_name:i,email:t}}),this.widget.debugState.logEvent("api:submitEmbeddedForm","success",{formExperienceApiName:i})):this.widget.debugState.logEvent("api:submitEmbeddedForm","error",{formExperienceApiName:i},"`submitEmbeddedForm` was called but `website_embedded_forms` feature flag is not enabled")},logDebugEvent:(e,t,i,n)=>{this.widget.debugState.logEvent(e,t,i,n)},setChatIsVisible:e=>{this.iframeManager.setChatIsVisible(e)}}),this.getIdentityQueue=[]}}var e5=__webpack_require__(9879),e6=__webpack_require__(1504);let e9={logger:self.console,WebSocket:self.WebSocket},e8={log(){for(var e=arguments.length,t=Array(e),i=0;inew Date().getTime(),te=e=>(e7()-e)/1e3;class tt{start(){this.isRunning()||(this.startedAt=e7(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),e8.log("ConnectionMonitor started. stale threshold = "+this.constructor.staleThreshold+" s"))}stop(){this.isRunning()&&(this.stoppedAt=e7(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),e8.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=e7()}recordConnectWaiting(){this.connectWaitingStartedAt=e7(),e8.log("ConnectionMonitor recorded waiting for connect")}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.connectWaitingStartedAt,delete this.disconnectedAt,e8.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=e7(),e8.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){let{staleThreshold:e,reconnectionBackoffRate:t}=this.constructor;return 1e3*e*Math.pow(1+t,Math.min(this.reconnectAttempts,10))*(1+(0===this.reconnectAttempts?1:t)*Math.random())}reconnectIfStale(){this.connectionIsStale()&&(e8.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", time stale = "+te(this.refreshedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?e8.log("ConnectionMonitor skipping reopening recent disconnect. time disconnected = "+te(this.disconnectedAt)+" s"):this.waitingForConnect()?e8.log("ConnectionMonitor skipping reopening recent connect waiting. time waiting = "+te(this.connectWaitingStartedAt)+" s"):(e8.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return te(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&te(this.disconnectedAt){(!this.connectionIsStale()||this.waitingForConnect())&&this.connection.isOpen()||(e8.log("ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = "+document.visibilityState),this.connection.reopen())},200)}constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}}tt.staleThreshold=6,tt.reconnectionBackoffRate=.15;let ti={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},{message_types:tn,protocols:tr}=ti,ts=tr.slice(0,tr.length-1),to=[].indexOf;class ta{send(e){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(e)),!0)}open(){return this.isActive()?(e8.log("Attempted to open WebSocket, but existing socket is "+this.getState()),!1):(e8.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+tr),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new e9.WebSocket(this.consumer.url,tr),this.installEventHandlers(),this.monitor.start(),this.monitor.recordConnectWaiting(),this._connectedBefore=!0,!0)}close(e){let{allowReconnect:t}=void 0===e?{allowReconnect:!0}:e;if(t||this.monitor.stop(),this.isActive())return this.webSocket.close()}reopen(){if(e8.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(e){e8.log("Failed to reopen WebSocket",e)}finally{e8.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}hasConnectedBefore(){return!!this._connectedBefore}isProtocolSupported(){return to.call(ts,this.getProtocol())>=0}isState(){for(var e=arguments.length,t=Array(e),i=0;i=0}getState(){if(this.webSocket){for(let e in e9.WebSocket)if(e9.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){let t=this.events[e].bind(this);this.webSocket["on"+e]=t}}uninstallEventHandlers(){for(let e in this.events)this.webSocket["on"+e]=function(){}}constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new tt(this),this.disconnected=!0}}ta.reopenDelay=500,ta.prototype.events={message(e){if(!this.isProtocolSupported())return;let{identifier:t,message:i,reason:n,reconnect:r,type:s}=JSON.parse(e.data);switch(s){case tn.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case tn.disconnect:e8.log("Disconnecting. Reason: "+n);try{this.subscriptions.notifyAll("disconnecting",{allowReconnect:r,reason:n})}catch(e){}return this.close({allowReconnect:r});case tn.ping:try{this.subscriptions.notifyAll("ping")}catch(e){}return this.monitor.recordPing();case tn.confirmation:return this.subscriptions.notify(t,"connected");case tn.rejection:return this.subscriptions.reject(t);default:return this.monitor.recordPing(),i.__event=e,this.subscriptions.notify(t,"received",i)}},open(){if(e8.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return e8.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(e){if(e8.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){e8.log("WebSocket onerror event")}};let tl=function(e,t){if(null!=t)for(let i in t){let n=t[i];e[i]=n}return e};class tc{perform(e,t){return void 0===t&&(t={}),t.action=e,this.send(t)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}constructor(e,t={},i){this.consumer=e,this.identifier=JSON.stringify(t),tl(this,i)}}class tu{create(e,t){let i=new tc(this.consumer,"object"==typeof e?e:{channel:e},t);return this.add(i)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.sendCommand(e,"subscribe"),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map(e=>(this.forget(e),this.notify(e,"rejected"),e))}forget(e){return this.subscriptions=this.subscriptions.filter(t=>t!==e),e}findAll(e){return this.subscriptions.filter(t=>t.identifier===e)}reload(){return this.subscriptions.map(e=>this.sendCommand(e,"subscribe"))}notifyAll(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;nthis.notify(t,e,...i))}notify(e,t){for(var i=arguments.length,n=Array(i>2?i-2:0),r=2;r"function"==typeof e[t]?e[t](...n):void 0)}sendCommand(e,t){let{identifier:i}=e;return this.consumer.send({command:t,identifier:i})}constructor(e){this.consumer=e,this.subscriptions=[]}}class td{get url(){return function(e,t){let i;try{let t=new URL(e);i=Array.from(t.searchParams.entries()).length>0}catch(e){i=!1}let n="ic="+!t;return e+(i?"&"+n:"?"+n)}(function(e){if("function"==typeof e&&(e=e()),!e||/^wss?:/i.test(e))return e;{let t=document.createElement("a");return t.href=e,t.href=t.href,t.protocol=t.protocol.replace("http","ws"),t.href}}(this._url),this.connection.hasConnectedBefore())}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}constructor(e){this._url=e,this.subscriptions=new tu(this),this.connection=new ta(this)}}class th{static startButtonClickSpan(){eG.startSpan(eH.BUTTON_CLICK),eG.startSpan(eH.WAIT_FOR_LIGHTBOX_LOADING_SPINNER,{parentSpan:eH.BUTTON_CLICK})}static startSubmitFormSpan(e){eG.startSpan(eV.SUBMIT_FORM,{attributes:e})}static finishFormOrButtonSpan(e){let t=this.extractAttributesIfFormsOrButtonsResponse(e);t&&(eG.cancelSpan(eH.WAIT_FOR_LIGHTBOX_LOADING_SPINNER),eG.finishSpans([eV.SUBMIT_FORM,eH.BUTTON_CLICK],{attributes:t}))}static finishWaitForLightboxLoadingSpinnerSpan(){eG.finishSpan(eH.WAIT_FOR_LIGHTBOX_LOADING_SPINNER)}static nonEmptyUniqueValues(e){return Array.from(new Set(e)).filter(e=>void 0!==e).filter(e=>null!==e).filter(e=>""!==e)}static setExperienceResultType(e,t){e["app.experience_result_type"]=t}static updateExperienceResultType(e){let{attributes:t,widgetInitAfterButtonOrForm:i,fallbackToDefaultForButtonOrForm:n,messages:r=[]}=e;if(i)this.setExperienceResultType(t,"widget");else if(n)this.setExperienceResultType(t,"fallback_to_default");else{let e=this.nonEmptyUniqueValues(r.map(e=>e.type));if(e.length>0&&(t["message.types"]=e,!t["app.experience_result_type"])){let i=e.includes("lightbox_gather"),n=e.includes("calendar_event_offer");i?this.setExperienceResultType(t,"qualification_questions"):n?this.setExperienceResultType(t,"meeting_booker"):this.setExperienceResultType(t,"unknown")}}}static extractAttributesIfFormsOrButtonsResponse(e){var t,i,n,r,s,o;let a;try{let o=((null==(i=e.payload)||null==(t=i.messages)?void 0:t.length)||0)>0,l=((null==(r=e.payload)||null==(n=r.conversations)?void 0:n.length)||0)>0,c="initElementConversation"===e.event&&o,u="elementMessage"===e.event,d=l&&e.payload.conversations[e.payload.conversations.length-1],h="initState"===e.event&&["smart_cta","form"].includes(null==d?void 0:d.triggeredByBotType),p="closeLightbox"===e.event&&(null==(s=e.payload)?void 0:s.fallbackToDefault)===!0;if((c||u||h||p)&&(a={},this.updateExperienceResultType({attributes:a,widgetInitAfterButtonOrForm:h,fallbackToDefaultForButtonOrForm:p}),o)){let{messages:t=[]}=e.payload||{};this.updateExperienceResultType({attributes:a,messages:t});let i=this.nonEmptyUniqueValues(t.map(e=>e.eventType));i.length>0&&(a["message.event_types"]=i);let n=this.nonEmptyUniqueValues(t.map(e=>e.conversationId));n.length>0&&(a["conversation.ids"]=n)}}catch(e){null==(o=(0,e_.N)())||o.captureException(e)}return a}}var tp=__webpack_require__(9706);class tm extends u.A{cleanup(){this.disconnect(),super.cleanup()}get emitter(){return this._emitter}get cable(){return this._cable}resetWhenConnected(){var e,t,i,n,r;let s,o,a,l,c,u,d,h;null==(e=this.whenConnected)||e.cancel(),this.whenConnected=(t=this._emitter,i="connected",n="disconnecting",void 0===(r=(e,r)=>{let o=t=>{s(),e(t)},a=e=>{s(),r(e)};i&&t.once(i,o),n&&t.once(n,a),s=()=>{i&&t.off(i,o),n&&t.off(n,a)}})&&(r=()=>{}),c=!1,u=!1,d=new Promise(e=>l=e),(h=new Promise((e,t)=>{r(o=t=>{c=!0,l(),e(t)},a=e=>{c=!0,l(),t(e)})})).catch(()=>{}),{resolve:o,reject:a,cancel:e=>{void 0===e&&(e={isCanceled:!0}),c||(u=!0,a(e))},get isSettled(){return c},get isCanceled(){return u},then:function(){for(var e=arguments.length,t=Array(e),i=0;i{if("delay_connect"!==e)throw e})}connect(){var e;let t=this.widget.connectionParams,i=this.config.wsHost+"?"+new URLSearchParams(ey()(t,ev())).toString();return this._cable=(void 0===(e=i)&&(e=function(e){let t=document.head.querySelector("meta[name='action-cable-url']");if(t)return t.getAttribute("content")}("url")||ti.default_mount_path),new td(e)),this.subscription=this._cable.subscriptions.create({channel:"Visitors::WidgetChannel"},{connected:this.onConnected,disconnecting:this.onDisconnecting,ping:this.onPing,received:this.onReceived}),this.liveViewSubscription=this._cable.subscriptions.create({channel:"CoBrowse::VisitorChannel"},{received:this.onReceivedLiveView}),this.whenConnected}disconnect(){var e;null==(e=this.whenConnected)||e.cancel(),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.liveViewSubscription&&(this.liveViewSubscription.unsubscribe(),this.liveViewSubscription=null),this._cable&&(this._cable.disconnect(),this._cable=null),this.onDisconnected(),this.widget.resetWidgetId()}startEmitter(){this.messages.forEach(e=>this.handleMessage(e)),this.emittingMessages=!0}async send(e){var t;let i=eN();await this.whenConnected,i&&(e||(e={}),e.traceparent=eB(i)),null==(t=this.subscription)||t.send(e)}async perform(e,t){var i;let n=eN();n&&(t||(t={}),t.traceparent=eB(n)),await this.whenConnected,null==(i=this.subscription)||i.perform(e,t)}sendLiveView(e){var t;null==(t=this.liveViewSubscription)||t.send(e)}on(e,t,i){return this._emitter.on(e,t,i)}once(e,t,i){return this._emitter.once(e,t,i)}off(e,t){return this._emitter.off(e,t)}emit(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n-1?this._emitter.emit(e.event):[].concat(e).forEach(e=>{var t,i,n;if(th.finishFormOrButtonSpan(e),"redirect"===e.event&&e.payload.url)e.payload.isQualifiedForm&&(null==(t=this.offerScript)?void 0:t.hasActiveForm)?this._emitter.emit("qualifiedFormRedirect",e.payload):(this._emitter.emit(e.event),window.location.href=e.payload.url);else if("endLoadingState"===e.event)this._emitter.emit(e.event);else if("personalizeWebsite"===e.event)this._emitter.emit(e.event,e.payload);else if("initOffers"===e.event){let{payload:t}=e;t.length>0&&this.widget.initializeOffers().then(()=>{this._emitter.emit(e.event,t)})}else"getQualifiedFormConfig"===e.event||"showExperienceEnd"===e.event||"initMeetingLinkConversation"===e.event?this._emitter.emit(e.event,e.payload):"widgetEvent"===e.event?this._emitter.emit(e.event,e.payload.event_name):tp.Yb.includes(e.event)||"syncScriptState"===e.event?this._emitter.emit(e.event,e.payload):((null==(i=e.payload)?void 0:i.isMultimodal)&&("initState"===e.event?this._emitter.emit("initBackendState",e.payload):"message"===e.event&&this._emitter.emit("message",e.payload)),"initState"===e.event?(this.initStateReceived=!0,this._emitter.emit("initState")):"elementMessage"===e.event?this._emitter.emit("elementMessage",e.payload):"callEnded"===e.event&&this._emitter.emit("callEnded",e.payload),(null==(n=this.featureFlags)?void 0:n.widgetAllowMessengerV2Styling)?this._emitter.emit("multimodal",e):this._emitter.emit("received",e.event,e.payload))})}constructor(e){super(e),this.onConnected=()=>{if(this.hasConnectedBefore){var e;null==(e=this.subscription)||e.send({event:"reconnected"}),this._emitter.emit("reconnected")}this.hasConnectedBefore=!0,this._emitter.emit("connected")},this.onDisconnecting=e=>{e&&e.reason&&("invalid_version"===e.reason&&this._emitter.emit("refresh"),this._emitter.emit("disconnecting",e.reason)),this.onDisconnected()},this.onPing=()=>{this._emitter.emit("ping")},this.onReceived=e=>{this.emittingMessages?this.handleMessage(e):this.messages.push(e)},this.onReceivedLiveView=e=>{this.widget.initializePageMirror().then(()=>{this._emitter.emit("receivedLiveView",e)})},this._emitter=new e6.TinyEmitter,this._cable=null,this.emittingMessages=!1,this.messages=[],this.hasConnectedBefore=!1,this.initStateReceived=!1,this.subscription=null,this.liveViewSubscription=null,this.resetWhenConnected()}}var tf=__webpack_require__(1941);let tg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);class tv extends(0,$.j)(Object){register(e,t){this.registrations[e]={Class:t,singleton:!1}}register1(e,t){this.registrations[e]={Class:t,singleton:!0}}set(e,t){this.singletons[e]=t}unset(e){delete this.singletons[e]}async load(e,t){if(void 0===t&&(t=!1),this.moduleMap.has(e))return this.moduleMap.get(e);let i=await this.loadModule(e);t?this.register1(e,i):this.register(e,i);let n=this.resolve(e);return this.moduleMap.set(e,n),n}resolve(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n{tg(e,"dispose")&&e.dispose()});if(this.reset(),e.length>0)throw Error("Dispose errors: "+e.join(", "))}reset(){this.singletons={},this.registrations={}}getRegistration(e){if(tg(this.registrations,e))return this.registrations[e];throw Error("Unknown dependency: "+e)}loadOffersScript(){return __webpack_require__.e("243").then(__webpack_require__.bind(__webpack_require__,2282))}loadLiveView(){return __webpack_require__.e("587").then(__webpack_require__.bind(__webpack_require__,8869))}loadAnalytics(){return __webpack_require__.e("762").then(__webpack_require__.bind(__webpack_require__,2510))}loadMultimodal(){return __webpack_require__.e("874").then(__webpack_require__.bind(__webpack_require__,4629))}loadMultimodalV2(){return __webpack_require__.e("29").then(__webpack_require__.bind(__webpack_require__,5193))}loadDummyModule(){return __webpack_require__.e("342").then(__webpack_require__.bind(__webpack_require__,8960))}async raceWithTimeout(e,t){let i,n=new Promise((e,n)=>{i=setTimeout(()=>{n(Error("Failed to import dynamic module within "+t+"ms"))},t)});try{return await Promise.race([e,n])}finally{i&&clearTimeout(i)}}async loadModule(e){let t,i,n,r,s,o;switch(e){case"offers":{let e=await this.raceWithTimeout(this.loadOffersScript(),tv.DYNAMIC_IMPORT_TIMEOUT_MS);({OfferMainScript:i}=e),t=i;break}case"liveView":({default:n}=await this.raceWithTimeout(this.loadLiveView(),tv.DYNAMIC_IMPORT_TIMEOUT_MS)),t=n;break;case"analytics":({default:r}=await this.raceWithTimeout(this.loadAnalytics(),tv.DYNAMIC_IMPORT_TIMEOUT_MS)),t=r;break;case"multimodal":({Multimodal:s}=await this.raceWithTimeout(this.loadMultimodal(),tv.DYNAMIC_IMPORT_TIMEOUT_MS)),t=s;break;case"multimodal_v2":({Multimodal:s}=await this.raceWithTimeout(this.loadMultimodalV2(),tv.DYNAMIC_IMPORT_TIMEOUT_MS)),t=s;break;case"dummyModule":({default:o}=await this.raceWithTimeout(this.loadDummyModule(),tv.DYNAMIC_IMPORT_TIMEOUT_MS)),t=o;break;default:throw Error("Cannot load unknown module: "+e)}return t}constructor(){super(),this.registrations={},this.singletons={},this.moduleMap=new Map,this.reset()}}tv.DYNAMIC_IMPORT_TIMEOUT_MS=15e3;var tb=__webpack_require__(5825);class ty extends u.A{emitActivity(e){this.tracker.afterInit(()=>{"viewed"===e.type&&this.viewedContent.has(e.trackingUuid)||("viewed"===e.type&&this.viewedContent.add(e.trackingUuid),this.channel.perform("record_content_activity",(0,S._)({},this.underscorePayload(e))),this.debugLog("Activity emitted",(0,S._)({},e)))})}debugLog(e,t){void 0===t&&(t={}),(0,tb.dI)("[ContentActivityEmitter] "+e,t)}constructor(...e){super(...e),this.viewedContent=new Set,this.underscorePayload=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t.replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase(),i]}))}}let t_="application/x-postmate-v1+json",tw=0,tE=0,tA={handshake:1,"handshake-reply":1,call:1,emit:1,reply:1,request:1,disconnect:1},tS=(e,t)=>("string"!=typeof t||e.origin===t)&&!!e.data&&("object"!=typeof e.data||"postmate"in e.data)&&e.data.type===t_&&!!tA[e.data.postmate];class tx{get(e){return new tT.Promise(t=>{let i=++tw,n=e=>{e.data.uid===i&&"reply"===e.data.postmate&&e.data.childId===this.childId&&(this.parent.removeEventListener("message",n,!1),t(e.data.value))};this.parent.addEventListener("message",n,!1),this.child.postMessage({postmate:"request",type:t_,property:e,uid:i},this.childOrigin)})}call(e,t){this.child.postMessage({postmate:"call",type:t_,property:e,data:t},this.childOrigin)}on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}destroy(){window.removeEventListener("message",this.listener,!1),this.existingFrame?this.child.postMessage({postmate:"disconnect",type:t_},this.childOrigin):this.frame.parentNode.removeChild(this.frame)}constructor(e){this.parent=e.parent,this.frame=e.frame,this.child=e.child,this.childOrigin=e.childOrigin,this.childId=e.childId,this.existingFrame=e.existingFrame,this.events={},this.listener=e=>{if(!tS(e,this.childOrigin))return!1;let{data:t,name:i}=((e||{}).data||{}).value||{};"emit"===e.data.postmate&&e.data.childId===this.childId&&i in this.events&&this.events[i].forEach(e=>{e.call(this,t)})},this.parent.addEventListener("message",this.listener,!1)}}class tC{emit(e,t){this.parent.postMessage({postmate:"emit",type:t_,childId:this.childId,value:{name:e,data:t}},this.parentOrigin)}constructor(e){this.listener=e=>{var t;let i;if(!tS(e,this.parentOrigin))return;let{property:n,uid:r,data:s}=e.data;if("disconnect"===e.data.postmate){this.child.removeEventListener("message",this.listener),"_disconnect"in this.model&&"function"==typeof this.model._disconnect&&this.model._disconnect();return}if("call"===e.data.postmate){n in this.model&&"function"==typeof this.model[n]&&this.model[n](s);return}(i="function"==typeof(t=this.model)[n]?t[n]():t[n],tT.Promise.resolve(i)).then(t=>e.source.postMessage({property:n,postmate:"reply",type:t_,childId:this.childId,uid:r,value:t},e.origin))},this.model=e.model,this.parent=e.parent,this.parentOrigin=e.parentOrigin,this.child=e.child,this.childId=e.childId,this.child.addEventListener("message",this.listener)}}class tT{sendHandshake(e){let t,i,n,r,s=((i=document.createElement("a")).href=e,n=i.protocol.length>4?i.protocol:window.location.protocol,r=i.host.length?"80"===i.port||"443"===i.port?i.hostname:i.host:window.location.host,i.origin||n+"//"+r),o=0;return new tT.Promise((i,n)=>{let r=e=>!!tS(e,s)&&e.data.childId===this.childId&&("handshake-reply"===e.data.postmate?(clearInterval(t),this.parent.removeEventListener("message",r,!1),this.childOrigin=e.origin,i(new tx(this))):n("Failed handshake"));this.parent.addEventListener("message",r,!1);let a=()=>{if(++o>10)return clearInterval(t),n("Handshake Timeout Reached");this.child.postMessage({postmate:"handshake",type:t_,model:this.model,childId:this.childId},s)},l=()=>{a(),t=setInterval(a,500)};this.existingFrame?l():(this.frame.attachEvent?this.frame.attachEvent("onload",l):this.frame.addEventListener("load",l),this.frame.src=e)})}constructor({container:e=document.body,model:t,url:i,name:n,classListArray:r=[],frame:s}){if(s?(this.frame=s,this.existingFrame=!0):(this.frame=document.createElement("iframe"),this.frame.name=n||"",r.length>0&&this.frame.classList.add.apply(this.frame.classList,r),e.appendChild(this.frame)),this.existingFrame&&!this.frame.contentWindow&&!this.frame.contentDocument)return tT.Promise.reject("iframe does not have contentWindow or contentDocument");return this.parent=window,this.child=this.frame.contentWindow||this.frame.contentDocument.parentWindow,this.model=t||{},this.childId=++tE,this.sendHandshake(i||s.src)}}tT.debug=!1,tT.Promise=(()=>{try{return window?window.Promise:Promise}catch(e){return null}})(),tT.Model=class{sendHandshakeReply(){return new tT.Promise((e,t)=>{let i=n=>{if(n.data.postmate){if("handshake"===n.data.postmate){this.child.removeEventListener("message",i,!1),n.source.postMessage({postmate:"handshake-reply",type:t_,childId:n.data.childId},n.origin),this.childId=n.data.childId,this.parentOrigin=n.origin;let t=n.data.model;return t&&Object.keys(t).forEach(e=>{this.model[e]=t[e]}),e(new tC(this))}return t("Handshake Reply Failed")}};this.child.addEventListener("message",i,!1)})}constructor(e){return this.child=window,this.model=e,this.parent=this.child.parent,this.sendHandshakeReply()}};class tk extends(0,$.j)(Object){init(){this.handshake=new tT.Model(this.postMessageHandlers).then(e=>{if(!this.isDisposed)return this.addListener(),e}).catch(()=>{})}cleanup(){this.removeListener(),super.cleanup==null||super.cleanup.call(this)}addListener(){this.addedListener||(document.addEventListener("mousemove",this.mouseMoveListener),this.addedListener=!0)}removeListener(){this.addedListener&&(document.removeEventListener("mousemove",this.mouseMoveListener),this.addedListener=!1)}constructor(){super(),this.mouseMoveListener=e=>{this.isDisposed||this.handshake.then(t=>{this.isDisposed||null==t||t.emit("iframeMouseMove",{clientX:e.clientX,clientY:e.clientY})})},this.postMessageHandlers={_disconnect:()=>{this.removeListener(),this.init()}},this.addedListener=!1,this.init()}}let tI=class{new(){return new Date}now(){return Date.now()}};var tO=__webpack_require__(8221),tF=__webpack_require__.n(tO),tM=__webpack_require__(7350),tP=__webpack_require__.n(tM),tD=__webpack_require__(359);let tL={cs:{language:"Czech",translated_language:"Čeština",snippet:{page:{skip_to_chat:"Přeskočit na chat"}}},da:{language:"Danish",translated_language:"Dansk",snippet:{page:{skip_to_chat:"Spring til chat"}}},de:{language:"German",translated_language:"Deutsch",snippet:{page:{skip_to_chat:"Weiter zum Chat"}}},en:{language:"English",translated_language:"English",snippet:{page:{skip_to_chat:"Skip to chat"}}},es:{language:"Spanish",translated_language:"Espa\xf1ol",snippet:{page:{skip_to_chat:"Saltar al chat"}}},es_LA:{language:"Spanish (Latin America)",translated_language:"Espa\xf1ol",snippet:{page:{skip_to_chat:"Pasar al chat"}}},fi:{language:"Finnish",translated_language:"Suomi",snippet:{page:{skip_to_chat:"Siirry chattiin"}}},fr:{language:"French (European)",translated_language:"Fran\xe7ais",snippet:{page:{skip_to_chat:"Sauter \xe0 la discussion"}}},fr_CA:{language:"French (Canadian)",translated_language:"Fran\xe7ais (Canadien)",snippet:{page:{skip_to_chat:"Passer au clavardage"}}},id:{language:"Indonesian",translated_language:"Bahasa Indonesia",snippet:{page:{skip_to_chat:"Lanjut ke chat"}}},it:{language:"Italian",translated_language:"Italiano",snippet:{page:{skip_to_chat:"Passa alla chat"}}},ja:{language:"Japanese",translated_language:"日本語",snippet:{page:{skip_to_chat:"チャットへスキップ"}}},ko:{language:"Korean",translated_language:"한국어",snippet:{page:{skip_to_chat:"채팅으로 건너뛰기"}}},nb:{language:"Norwegian",translated_language:"Norsk bokm\xe5l",snippet:{page:{skip_to_chat:"Hopp til chat"}}},nl:{language:"Dutch",translated_language:"Nederlands",snippet:{page:{skip_to_chat:"Direct naar de chat"}}},pl:{language:"Polish",translated_language:"Polski",snippet:{page:{skip_to_chat:"Przejdź do czatu"}}},pt_BR:{language:"Portuguese (Brazil)",translated_language:"portugu\xeas",snippet:{page:{skip_to_chat:"Ir para o chat"}}},ru:{language:"Russian",translated_language:"русский язык",snippet:{page:{skip_to_chat:"Перейти к чату"}}},sv:{language:"Swedish",translated_language:"Svenska",snippet:{page:{skip_to_chat:"Hoppa till chatten"}}},th:{language:"Thai",translated_language:"ไทย",snippet:{page:{skip_to_chat:"ข้ามไปที่การแชท"}}},tr:{language:"Turkish",translated_language:"T\xfcrk\xe7e",snippet:{page:{skip_to_chat:"Sohbete ge\xe7"}}},vi:{language:"Vietnamese",translated_language:"Tiếng Việt",snippet:{page:{skip_to_chat:"Chuyển đến tr\xf2 chuyện"}}},zh_CN:{language:"Chinese (Simplified)",translated_language:"汉语",snippet:{page:{skip_to_chat:"跳转到聊天 "}}},zh_TW:{language:"Chinese (Traditional)",translated_language:"漢語",snippet:{page:{skip_to_chat:"跳至聊天室"}}}},tR=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);class tN{constructor(e){this.t=(e,t)=>{void 0===t&&(t={});let i=e.split("."),{translations:n}=this;for(;i.length&&null!=(n=n[i.shift()]););return null!=n?(Object.keys(t).forEach(e=>{let i=RegExp("\\{\\{"+e+"\\}\\}","g");n=n.replace(i,t[e])}),n):""},this.locale=e}}class tB extends tN{get translations(){return tL[this.locale]}}var tU=__webpack_require__(2617),tj=__webpack_require__(1530);tT.Promise=Promise;let tz="q-messenger-frame-skip-link",tq="q-messenger-frame",tH=["messagesDismissed","messengerClosed","messengerOpened"],tV={desktop:{width:"320px",height:"450px"},mobile:{width:"354px",height:"225px"}},tW={desktop:{width:"538px",height:"calc(100vh - 150px)"},mobile:{width:"100vw",height:"100dvh"}};var tQ=(0,o._)("_resizeIframe"),tG=(0,o._)("_setChildFrameSize"),t$=(0,o._)("__setChildFrameSize"),tK=(0,o._)("__debouncedSetChildFrameSize"),tY=(0,o._)("_addIframeListeners"),tJ=(0,o._)("_addEventListener");class tX extends u.A{get widgetHandshake(){if(!this._widgetHandshake)throw Error("Widget handshake not initialized for iframe manager");return this._widgetHandshake}set widgetHandshake(e){this._widgetHandshake=e}get embeddedHost(){var e;return this.config.allowEmbeddedWidgetMode?null!=(e=this._embeddedHost)?e:this._embeddedHost=document.querySelector("[data-qualified-embedded-widget-host]"):null}init(){return this.widgetHandshake.then(e=>{e.call("initCookieState",this.visitor.messengerState),e.call("updateParentFocussed",document.hasFocus()),e.call("setHostname",this.locationProvider.hostname),e.call("setIsEmbedded",null!==this.embeddedHost),e.on("displaySkipLink",e=>{let{locale:t}=e;if(this.config.hasMessengerSkipLink&&null==document.getElementById(tz)&&null!=document.getElementById(tq)){let e=document.createElement("button");e.textContent=new tB(t).t("snippet.page.skip_to_chat")||"Skip to chat",e.id=tz,e.setAttribute("type","button"),e.onclick=function(){let e=document.getElementById(tq);null==e||e.focus()},document.body.prepend(e)}}),this.channel.on("disconnected",()=>e.call("disconnected")),this.channel.on("received",(t,i)=>{e.call(t,i)}),this.channel.on("requestAssetPerformanceEntries",t=>e.call("requestAssetPerformanceEntries",t)),e.on("assetPerformanceEntries",e=>this.channel.emit("assetPerformanceEntries",e)),e.on("widgetLongTaskEntries",e=>{this.channel.emit("widgetLongTasks",e)}),e.on("startLightboxLoadingSpinner",()=>{this.channel.emit("startLightboxLoadingSpinner")}),e.on("reinitForMissingMessage",()=>{var e;null==this||null==(e=this.widget)||e.serverLog({message:"Calling reinit_for_missing_message",type:"log",extra:{event:"reinit_for_missing_message"}})}),Object.keys(this.iframeEvents).forEach(t=>e.on(t,this.iframeEvents[t])),e.on("mirrorEvent",t=>this.onMirrorEvent(e.frame,t)),e.on("readyToRender",()=>{this.embeddedHost&&((e.frame.classList.contains("maximized")||e.frame.classList.contains("qlfd-maximized"))&&this.embeddedHost.setAttribute("data-qualified-widget-ready","true"),this._embeddedReadyToRender=!0)});let{hasCLSImprovements:t}=this.widget.config;this.isMobileJs.phone||this.isMobileJs.tablet?t&&((0,s._)(this,tJ)[tJ](window,"touchmove",this.handleTouchMove),(0,s._)(this,tJ)[tJ](document,"touchend",this.handleTouchEnd)):((0,s._)(this,tJ)[tJ](window,"mousemove",this.handleCursor,{capture:!0}),(0,s._)(this,tY)[tY]()),(0,s._)(this,tJ)[tJ](window,"focus",this.handleWindowFocussed),(0,s._)(this,tJ)[tJ](window,"blur",this.handleWindowBlurred),this.sendScrollPercent=tP()(()=>{let e=document.documentElement,t=document.body,i="scrollTop",n="scrollHeight",r=(e[i]||t[i])/((e[n]||t[n])-e.clientHeight)*100;Number.isNaN(r)&&(r=100),this.widgetHandshake.then(e=>e.call("parentScrolledToPercent",r))},this.scrollThrottleInterval),(0,s._)(this,tJ)[tJ](window,"scroll",this.sendScrollPercent),this.sendScrollPercent(),this.onResize=tF()(()=>{this.widgetHandshake.then(e=>{(0,s._)(this,tG)[tG](e)})},this.resizeThrottleInterval),(0,s._)(this,tJ)[tJ](window,"resize",this.onResize)})}cleanup(){var e,t;null==(e=this.stylesheet.parentNode)||e.removeChild(this.stylesheet),this.widgetHandshake.then(e=>e.destroy()),null==(t=this.cursorPositionHandshakes)||t.forEach(e=>null==e.then?void 0:e.then.call(e,e=>null==e?void 0:e.destroy())),super.cleanup()}requestKeyframe(){this.widgetHandshake.then(e=>e.call("requestKeyframe"))}sendMessage(e){this.widgetHandshake.then(t=>t.call("sendMessage",e))}defaultWidgetSizes(e){let{hasCLSImprovements:t}=this.widget.config;if(!t&&e)return e;let i=t?tW:tV;return this.isMobileJs.phone?i.mobile:i.desktop}constructor(e){var t,i,n;super(e),t=this,Object.defineProperty(this,tQ,{writable:!0,value:void 0}),Object.defineProperty(this,tG,{writable:!0,value:void 0}),Object.defineProperty(this,t$,{writable:!0,value:void 0}),Object.defineProperty(this,tK,{writable:!0,value:void 0}),Object.defineProperty(this,tY,{writable:!0,value:void 0}),Object.defineProperty(this,tJ,{writable:!0,value:void 0}),this.childFrameCurrentHeight=0,this.childFrameCurrentWidth=0,this.backgroundCoverDiv=null,this.backgroundCoverTimeoutDisposer=null,this.originalDocumentTitle=null,this.flashDocumentTitle=null,this.apMessagesCount=0,this.autoRespondPounceCount=0,this.visitorResponded=!1,this.userResponded=!1,this.messengerEventsListeners=[],this._embeddedHost=null,this._embeddedReadyToRender=!1,this.cursorPositionHandshakes=[],this.mobileDragging=!1,this.scrollThrottleInterval=250,this.resizeThrottleInterval=250,this.iframeEvents={cookieStateChanged:e=>{let{attr:t,value:i}=e;return this.visitor[t]=i},resize:e=>{let{width:t,height:i}=e;this.childFrameCurrentWidth=t,this.childFrameCurrentHeight=i,this.widgetHandshake.then(e=>{(0,s._)(this,tG)[tG](e)})},endInlineLoading:e=>{this.channel.emit("endInlineLoading",e)},maximize:()=>{this.widgetHandshake.then(e=>{e.frame.classList.add("maximized","qlfd-maximized"),this.embeddedHost&&this.embeddedHost.setAttribute("data-qualified-widget-ready","true")})},minimize:()=>{this.widgetHandshake.then(e=>{e.frame.classList.remove("maximized","qlfd-maximized"),this.embeddedHost&&this.embeddedHost.removeAttribute("data-qualified-widget-ready")})},messageRead:e=>{this.channel.send({event:"messageRead",payload:{message_id:e}})},clientEvent:e=>{tH.includes(e)&&this.messengerEventsListeners.forEach(t=>{try{t(e)}catch(e){console.error("Qualified: Error in client event handler",e)}})},typing:e=>{let{message:t,uuid:i}=e;this.channel.send({event:"typing",payload:{message:t,uuid:i}})},setTitle:e=>{this.originalDocumentTitle=document.title,this.flashDocumentTitle=e,document.title=e},resetTitle:()=>{var e;document.title===this.flashDocumentTitle&&(document.title=null!=(e=this.originalDocumentTitle)?e:""),this.originalDocumentTitle=null,this.flashDocumentTitle=null},playAudio:e=>(0,tD.T)(""+this.config.host+e),togglePointerEvents:e=>{let{hasCLSImprovements:t}=this.widget.config;this.widgetHandshake.then(i=>{i.frame.classList.contains("qlfd-full-screen")&&t||e?i.frame.classList.remove("qlfd-disable-pointer-events"):i.frame.classList.add("qlfd-disable-pointer-events")})},click:e=>{let{x:t,y:i}=e;this.widgetHandshake.then(e=>{var n;e.frame.classList.add("qlfd-disable-pointer-events"),null==(n=document.elementFromPoint(e.frame.offsetLeft+t,e.frame.offsetTop+i))||n.click(),e.frame.classList.remove("qlfd-disable-pointer-events")})},channelSend:e=>{let{event:t,payload:i={}}=e;this.channel.send({event:t,payload:i})},reportError:e=>{let{message:t,type:i="both",extra:n={}}=e;fetch(this.widget.resourceUrl("visitor_events"),{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({event:t,type:i,extra:n})})},setFullScreen:e=>{var t,i;this.widgetHandshake.then(t=>{e?t.frame.classList.add("qlfd-full-screen"):(t.frame.classList.remove("qlfd-full-screen"),t.frame.classList.add("qlfd-not-full-screen"),setTimeout(()=>{t.frame.classList.remove("qlfd-not-full-screen")},300)),(0,s._)(this,tG)[tG](t),!e&&this.embeddedHost&&this._embeddedReadyToRender&&t.call("open")}),e?null==(t=this.offerScript)||t.pause():null==(i=this.offerScript)||i.resume()},setAutoPounceMessagesCount:e=>{this.apMessagesCount=e,1===this.apMessagesCount&&this.tracker.startBehaviorTracker()},setAutoRespondPounceCount:e=>{this.autoRespondPounceCount=e,1===this.autoRespondPounceCount&&this.tracker.startBehaviorTracker()},setUserResponded:e=>{this.userResponded=e},setVisitorResponded:e=>{this.visitorResponded=e},logMessage:e=>{var t;let{message:i,extra:n={}}=e;null==this||null==(t=this.widget)||t.serverLog({message:i,type:"log",extra:n})},emitContentActivity:e=>{this.contentActivityEmitter.emitActivity(e)}},this.openMessenger=()=>{this.widgetHandshake.then(e=>e.call("open"))},this.showMessengerLoading=()=>{this.widgetHandshake.then(e=>e.call("showLoading"))},this.showLightboxLoading=()=>{this.widgetHandshake.then(e=>e.call("showLightboxLoading"))},this.showInlineLoading=e=>{this.widgetHandshake.then(t=>t.call("showInlineLoading",e))},this.closeLightbox=()=>{this.widgetHandshake.then(e=>e.call("closeLightbox"))},this.onMirrorEvent=(e,t)=>{null==this.pageMirror.onMessageFromWidget||this.pageMirror.onMessageFromWidget.call(this.pageMirror,e,t)},this.startShipper=()=>{this.widgetHandshake.then(e=>e.call("startShipper"))},this.stopShipper=()=>{this.widgetHandshake.then(e=>e.call("stopShipper"))},this.handleCursor=e=>{let{clientX:t,clientY:i}=e;this.widgetHandshake.then(e=>{let n={x:t-e.frame.offsetLeft,y:i-e.frame.offsetTop};n.x>=0&&n.y>=0&&e.call("mousemove",n)})},this.handleTouch=e=>{let{clientX:t,clientY:i}=e;this.widgetHandshake.then(e=>{let n={x:t-e.frame.offsetLeft,y:i-e.frame.offsetTop};n.x>=0&&n.y>=0&&e.call("touch",n)})},this.handleTouchEnd=e=>{let t=e.changedTouches[0];if(!this.mobileDragging){let{clientX:i,clientY:n}=t,r=window.innerWidth-i,s=window.innerHeight-n;r{this.mobileDragging=!0},this.handleIframeCursor=(e,t)=>{this.handleCursor({clientX:t.getBoundingClientRect().left+e.clientX,clientY:t.getBoundingClientRect().top+e.clientY})},this.handleWindowFocussed=()=>{this.widgetHandshake.then(e=>e.call("updateParentFocussed",!0))},this.handleWindowBlurred=()=>{this.widgetHandshake.then(e=>e.call("updateParentFocussed",!1))},this.handleSyncScriptState=e=>{this.widgetHandshake.then(t=>t.call("syncScriptState",e))},this.addMessengerEventsListener=e=>{this.messengerEventsListeners.push(e)},this.setChatIsVisible=e=>{this.widgetHandshake.then(t=>t.call("setChatIsVisible",e))},(0,s._)(this,tQ)[tQ]=(e,t,i)=>{if(e.frame.classList.contains("qlfd-full-screen"))return;let n=this.defaultWidgetSizes({width:""+t+"px",height:""+i+"px"});e.frame.setAttribute("style","\n height: "+n.height+" !important;\n width: "+n.width+" !important;\n color-scheme: normal;\n ")},(0,s._)(this,tG)[tG]=e=>{var t;return(null==(t=this.featureFlags)?void 0:t.widgetDebounceIframeResizes)?(0,s._)(this,tK)[tK](e):(0,s._)(this,t$)[t$](e)},(0,s._)(this,t$)[t$]=e=>{let t=this.childFrameCurrentHeight,i=this.childFrameCurrentWidth,n=e.frame.classList.contains("maximized")||e.frame.classList.contains("qlfd-maximized"),r=e.frame.classList.contains("qlfd-is-mobile"),o=e.frame.classList.contains("qlfd-full-screen"),a=document.documentElement.clientHeight,l=document.documentElement.clientWidth,c=at&&(h=d),a<600&&!this.isMobileJs.phone?e.frame.classList.add("qlfd-full-height"):e.frame.classList.remove("qlfd-full-height"),e.call("contentTooTall",c),e.call("contentTooWide",u),e.call("messengerTooTall",a<=d),e.frame.style.visibility="",e.frame.style.contentVisibility="",this.config.hasWidgetFullScreenWithScrollDisabler&&(r&&n||o)?tU.q.disableScroll("widget",{overlayElement:e.frame}):tU.q.restoreScroll("widget"),r&&n||o||this.embeddedHost?e.frame.removeAttribute("style"):(0,s._)(this,tQ)[tQ](e,u?l:i,h)},(0,s._)(this,tK)[tK]=tF()(e=>(0,s._)(this,t$)[t$](e),this.resizeThrottleInterval,{leading:!0}),(0,s._)(this,tY)[tY]=()=>{this.cursorPositionHandshakes=[];let e=e=>{if(e.id!==tq&&"none"!==e.style.display)try{(0,s._)(this,tJ)[tJ](e.contentWindow,"mousemove",t=>this.handleIframeCursor(t,e))}catch(t){this.cursorPositionHandshakes.push(new tT({frame:e}).then(t=>(t.on("iframeMouseMove",t=>this.handleIframeCursor(t,e)),t)).catch(()=>{}))}};document.querySelectorAll("iframe").forEach(e),this.iframeObserver=new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{"tagName"in t&&"IFRAME"===t.tagName?e(t):t instanceof HTMLElement&&t.querySelectorAll("iframe").forEach(e)})})}),this.iframeObserver.observe(document.body,{childList:!0,subtree:!0}),this.callOnDispose(()=>{var e;null==(e=this.iframeObserver)||e.disconnect()})},(0,s._)(this,tJ)[tJ]=function(){for(var e=arguments.length,i=Array(e),n=0;n{var t;e.id=tq,e.dataset.mirrored="true",(this.featureFlags.video||this.featureFlags.voice)&&e.setAttribute("allow","camera;microphone"),e.setAttribute("title","Qualified Messenger"),e.setAttribute("style","\n height: "+r.height+" !important;\n width: "+r.width+" !important;\n visibility: hidden !important;\n content-visibility: hidden !important;\n "),(null!=(t=this.embeddedHost)?t:o?document.documentElement:document.body).appendChild(e)}},classListArray:c,url:this.visitor.resourceUrl("messenger",a)})}}(0,x.Cg)([K.W,(0,x.Sn)("design:type","undefined"==typeof LocationProvider?Object:LocationProvider)],tX.prototype,"locationProvider",void 0);class tZ{get persistedState(){let e=(0,Z.LQ)(this.KEY);return e&&e.state&&Number.isInteger(e.expiresAt)&&e.expiresAt>Date.now()?e.state:(this.clearPersistedState(),null)}setPersistedState(e){(0,Z.Fn)(this.KEY,{expiresAt:Date.now()+this.TTL,state:e})}updateStateAtKey(e,t){var i;this.setPersistedState((0,S._)({},null!=(i=this.persistedState)?i:{},{[e]:t}))}clearPersistedState(){(0,Z.n9)(this.KEY)}constructor(){this.TTL=31536e7}}let t0={missing:"[❓ Not Detected]",success:"[✅ Success]",error:"[❌ Error]"};class t1{get textOutput(){let e=[this.name];return this.steps.forEach(t=>{let i=this.eventsMap[t];i?e.push(t0[i.status]+" "+(i.message||t7(t,i.status))):e.push(t0.missing+" "+t7(t,"missing"))}),e.join("\n")}constructor(e){this.eventsMap=e}}class t2 extends t1{constructor(...e){super(...e),this.name="Custom Form Experience",this.steps=["debug:formSubmitCapture","api:saveFormData","api:showFormExperience"]}}class t3 extends t1{constructor(...e){super(...e),this.name="HubSpot Form Experience",this.steps=["widget:hasMeetingBookerExperienceBuilder","widget:hubspot:hbsptFound","debug:formSubmitCapture","widget:hubspot:onFormSubmit","visitor:setFormExperienceDataWithExpiry","widget:hubspot:onFormSubmitted","tracker:showExperienceForForm","widget:formExperienceDataFound"]}}class t4 extends t1{constructor(...e){super(...e),this.name="Marketo Form Experience",this.steps=["widget:hasMeetingBookerExperienceBuilder","widget:marketo:MktoForms2Found","widget:marketo:configuredFormFound","debug:formSubmitCapture","widget:marketo:onSubmit","visitor:setFormExperienceDataWithExpiry","widget:marketo:onSuccess","tracker:showExperienceForForm","widget:formExperienceDataFound"]}}class t5 extends t1{constructor(...e){super(...e),this.name="Pardot Form Experience",this.steps=["api:initPardotForm","api:initPardotFormThankYou","api:saveFormData","api:parsePardotForm","api:parsePardotFormForLandingPage","visitor:setFormExperienceDataWithExpiry","api:showExperienceForForm"]}}let t6="[Qualified Debug]";class t9 extends tZ{set channel(e){this._channel=e}get channel(){if(this._channel)return this._channel;throw Error("Channel not set from upstream")}logEvent(e,t,i,n){if(this.isDebugging)try{console.log(t6,null!=n?n:t7(e,t),i);let r={timestamp:Date.now(),key:e,status:t,data:i,message:n};this.events.push(r),this.updateStateAtKey("events",this.events),this.eventsMap[e]=r}catch(e){console.error(t6,"Error logging event",e)}}initElements(){let e=document.createElement("dialog");e.id="qualified-debug-dialog",e.innerHTML="\n
Debug Output
\n \n
\n      \n      \n    ",Object.assign(e.style,{textAlign:"left"}),e.addEventListener("click",t=>{t.target.matches("#close-debug")&&e.close()}),e.addEventListener("click",t=>{t.target.matches("#archive-session")&&(this.channel.send({event:"archiveSession"}),e.close())}),document.body.appendChild(e);let t=document.createElement("button");t.textContent="Debug Output",Object.assign(t.style,{position:"fixed",bottom:"0",left:"0",zIndex:"2147483648",padding:"10px"}),t.addEventListener("click",()=>{e.querySelector("pre").textContent=this.flowOutput(),e.showModal()}),document.body.appendChild(t)}flowOutput(e){let t=this.flows.find(t=>t.name===e);return t?t.textOutput:this.flows.map(e=>e.textOutput).join("\n\n======\n\n")}constructor(){var e,t,i;if(super(),this.KEY="__q_local_form_debug",this.TTL=18e5,this.flows=[],this.events=[],this.eventsMap={},this.isDebugging=new URLSearchParams(document.location.search).has("q_debug")||!!(null==(e=this.persistedState)?void 0:e.isDebugging),this.updateStateAtKey("isDebugging",this.isDebugging),!this.isDebugging)return;this.flows=[new t2(this.eventsMap),new t4(this.eventsMap),new t3(this.eventsMap),new t5(this.eventsMap)],this.events=null!=(i=null==(t=this.persistedState)?void 0:t.events)?i:[],this.events.forEach(e=>{this.eventsMap[e.key]=e}),window.addEventListener("submit",()=>{this.logEvent("debug:formSubmitCapture","success")},{capture:!0}),(0,F.I_)().then(()=>this.initElements())}}let t8={debug:{formSubmitCapture:{missing:'Form "submit" event was not detected',success:'Form "submit" event was detected'}},api:{identify:{missing:'"identify" was not called',success:'"identify" was called successfully'},initPardotForm:{missing:'"initPardotForm" was not called',success:'"initPardotForm" was called successfully'},initPardotFormThankYou:{missing:'"initPardotFormThankYou" was not called',success:'"initPardotFormThankYou" was called successfully'},pardotFormSubmitted:{missing:'"pardotFormSubmitted" was not called',success:'"pardotFormSubmitted" was called successfully'},parsePardotForm:{missing:'"parsePardotForm" was not called',success:'"parsePardotForm" was called successfully'},parsePardotFormForLandingPage:{missing:'"parsePardotFormForLandingPage" was not called',success:'"parsePardotFormForLandingPage" was called successfully'},registerForm:{missing:'"registerForm" was not called',success:'"registerForm" was called successfully'},saveFormData:{missing:'"saveFormData" was not called',success:'"saveFormData" was called successfully'},saveSmartFormData:{missing:'"saveSmartFormData" was not called',success:'"saveSmartFormData" was called successfully'},sendSmartFormData:{missing:'"sendSmartFormData" was not called',success:'"sendSmartFormData" was called successfully'},showExperience:{missing:'"showExperience" was not called',success:'"showExperience" was called successfully'},showExperienceForForm:{missing:'"showExperienceForForm" was not called',success:'"showExperienceForForm" was called successfully'},showForm:{missing:'"showForm" was not called',success:'"showForm" was called successfully'},showFormExperience:{missing:'"showFormExperience" was not called',success:'"showFormExperience" was called successfully'},submitEmbeddedForm:{missing:'"submitEmbeddedForm" was not called',success:'"submitEmbeddedForm" was called successfully'}},tracker:{showExperienceForForm:{missing:'"showExperienceForForm" was not called',success:'"showExperienceForForm" was called successfully'}},visitor:{setFormExperienceDataWithExpiry:{missing:'"setFormExperienceDataWithExpiry" was not called',success:'"setFormExperienceDataWithExpiry" was called successfully'}},widget:{initFormExperience:{missing:'"initFormExperience" was not called',success:'"initFormExperience" was called successfully'},hasMeetingBookerExperienceBuilder:{error:'"meeting_booker_experience_builder" flag is not enabled',success:'"meeting_booker_experience_builder" flag is enabled'},hasSmartForms:{error:'"smart_forms" flag is not enabled',success:'"smart_forms" flag is enabled'},formExperienceDataFound:{missing:"No form experience data was found from previous page.",success:"Form experience data was found from previous page. Triggering form experience.",error:"Error while finding form experience data from previous page."},hubspot:{hbsptFound:{error:'"window.hbspt" is undefined. This is only necessary when attempting to configure a HubSpot Smart Form. Otherwise, you can safely ignore this log.',success:'"window.hbspt" is defined. Initializing HubSpot Smart Form now.'},initHubspotFormsComplete:{missing:'HubSpot forms setup using "window.hbspt" did not complete.',success:'HubSpot forms setup using "window.hbspt" has completed.'},onFormSubmit:{missing:'"onFormSubmit" event was not detected',success:'"onFormSubmit" event was detected'},onFormSubmitted:{missing:'"onFormSubmitted" event was not detected',success:'"onFormSubmitted" event was detected'}},marketo:{MktoForms2Found:{error:'"window.MktoForms2" is undefined. This is only necessary when attempting to configure a Marketo Smart Form. Otherwise, you can safely ignore this log.',success:'"window.MktoForms2" is defined. Initializing Marketo Smart Forms now.'},configuredFormFound:{missing:"No configured Marketo form was found.",success:"Found Marketo form in configurations."},configuredFormSetup:{missing:"No Marketo form was set up.",success:"Marketo form has been set up."},initMarketoFormsComplete:{missing:'Marketo forms setup using "window.MktoForms" did not complete.',success:'Marketo forms setup using "window.MktoForms" has completed.'},onSubmit:{missing:'"mktoForm.onSubmit" was not called',success:'"mktoForm.onSubmit" was called successfully'},onSuccess:{missing:'"mktoForm.onSuccess" was not called',success:'"mktoForm.onSuccess" was called successfully'},showExperienceForForm:{missing:"Redirecting after Marketo form submission. Showing form experience after redirect.",success:"No redirection from Marketo form. Showing form experience."},redirectEvent:{missing:"Marketo form did not redirect.",success:"Marketo form is redirecting."}},qualifiedForms:{initQualifiedForms:{success:"Embedded Qualified Form custom element was registered",error:"Embedded Qualified Form custom element was not registered"}},multimodal:{gate:{success:"Checked multimodal gate conditions"},hostReady:{success:"Multimodal host created and shadow root attached"},shadowRegistered:{success:"Registered shadow root with stylesLoader"},globalStyleInjected:{success:"Injected global styles element into shadow root"},loadStart:{success:"Starting dynamic import for multimodal module"},loadDone:{success:"Dynamic import resolved for multimodal module"},loadError:{error:"Dynamic import failed for multimodal module"},initCalled:{success:"Called multimodal.init()"}}}};function t7(e,t){var i;return null!=(i=e.split(":").reduce((e,t)=>e[t],t8)[t])?i:"Undefined message for "+e+":"+t}class ie extends tZ{setIsTracing(e,t){this.isTracing=e,this.traceValue=t,this.updateStateAtKey("isTracing",e),this.updateStateAtKey("traceValue",t)}constructor(...e){var t,i,n,r;super(...e),this.KEY="__q_local_trace",this.TTL=18e5,this.isTracing=null!=(r=null==(t=this.persistedState)?void 0:t.isTracing)&&r,this.traceValue=(null==(i=this.persistedState)?void 0:i.isTracing)?null==(n=this.persistedState)?void 0:n.traceValue:null}}let it=class{get hostname(){return window.location.hostname}};class ii extends u.A{createEmitter(e){return t=>{this.emitPageViewActivity({type:e,payload:t})}}emitPageViewActivity(e){let{type:t,payload:i}=e;this.hasPageViewActivityTracking&&this.tracker.afterInit(()=>{this.channel.send({event:"recordPageViewActivity",payload:(0,S._)({activity_type:t},this.underscorePayload(i))}),this.debugLog("Activity emitted",(0,S._)({type:t},i))})}debugLog(e,t){void 0===t&&(t={}),(0,tb.dI)("[PageViewActivityEmitter] "+e,t)}constructor(e){var t;super(e),this.emitPersonalizationInView=this.createEmitter("in_view"),this.emitPersonalizationApplied=this.createEmitter("experiment_arm_applied"),this.emitPersonalizationFallback=this.createEmitter("experiment_arm_fallback"),this.emitPersonalizationClick=this.createEmitter("click"),this.emitOfferDismiss=this.createEmitter("offer_dismiss"),this.emitOfferClick=this.createEmitter("offer_click"),this.emitOfferLanded=this.createEmitter("offer_landed"),this.emitOfferShown=this.createEmitter("offer_shown"),this.emitPrivacyDisclosureShown=this.createEmitter("offer_privacy_disclosure_shown"),this.emitPrivacyDisclosureConsented=this.createEmitter("offer_privacy_disclosure_consented"),this.emitFormFill=this.createEmitter("form_fill"),this.underscorePayload=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t.replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase(),i]})),this.hasPageViewActivityTracking=null!=(t=this.config.hasPageViewActivityTracking)&&t}}let ir=Symbol("__isProxy");class is{get(){return this.original}applyLoading(e){this.revert(),(0,M.lc)(this.original,e),this.unfreeze=this.freezeDomNode(this.original,{content:!0,style:!0}),this.state="loading"}removeLoading(){"loading"!==this.state||this.config&&this.personalize(this.config)}personalize(e){this.revert(),this.config=e,(0,M.Db)(this.original,e),this.unfreeze=this.freezeDomNode(this.original,this.getFreezeOptions(e)),this.state="personalized"}revert(){if("original"===this.state)return void this.snapshot();let e=null==this.unfreeze?void 0:this.unfreeze.call(this);this.original.innerHTML=this.innerHTML,"string"==typeof this.cssText&&this.original instanceof HTMLElement&&(this.original.style.cssText=this.cssText),e&&this.applyFreezeChanges(e),this.snapshot(),this.unfreeze=void 0,this.state="original"}addObserver(e){e.observe(this.original)}removeObserver(e){e.unobserve(this.original)}snapshot(){this.innerHTML=this.original.innerHTML,this.original instanceof HTMLElement&&(this.cssText=this.original.style.cssText)}freezeDomNode(e,t){let{content:i,style:n}=t,r=[];return i&&r.push(this.freezeDomProperty(e,"textContent",Node.prototype),this.freezeDomProperty(e,"appendChild",Node.prototype),this.freezeDomProperty(e,"removeChild",Node.prototype),this.freezeDomProperty(e,"replaceChild",Node.prototype)),e instanceof Element&&i&&r.push(this.freezeDomProperty(e,"innerHTML",Element.prototype),this.freezeDomProperty(e,"outerHTML",Element.prototype),this.freezeDomProperty(e,"append",Element.prototype),this.freezeDomProperty(e,"replaceChildren",Element.prototype)),e instanceof HTMLElement&&i&&r.push(this.freezeDomProperty(e,"innerText",HTMLElement.prototype)),e instanceof HTMLElement&&n&&(this.enhancedProxyFreezing&&r.push(this.freezeDomProperty(e.style,"setProperty",CSSStyleDeclaration.prototype),this.freezeDomProperty(e.style,"removeProperty",CSSStyleDeclaration.prototype)),r.push(this.freezeDomProperty(e,"style",HTMLElement.prototype))),e.childNodes.forEach(e=>r.push(this.freezeDomNode(e,{content:i,style:n}))),()=>r.map(e=>e()).flat()}freezeDomProperty(e,t,i){let n=e[t],r={object:e,property:t,set:null,calls:[],innerSet:new Map};return Object.defineProperty(e,t,{get:()=>n&&("object"==typeof n||"function"==typeof n)?new Proxy(n,(0,S._)({},this.enhancedProxyFreezing&&{get:(e,t)=>{if(t===ir)return!0;let i=e[t];return"function"!=typeof i||Reflect.get(i,ir)?i:i.bind(e)}},{apply:(e,i,n)=>{(0,tb.dI)("Attempted to call "+t+", but it's not callable."),r.calls.push(n)},set:(e,i,n)=>((0,tb.dI)("Attempted to modify "+i+" of "+t+", but it's read-only."),r.innerSet.set(i,n),!0)})):n,set:e=>{(0,tb.dI)("Attempted to modify "+t+", but it's read-only."),r.set=e,r.innerSet.clear()},configurable:!0}),()=>{var s;let o=null!=(s=Object.getOwnPropertyDescriptor(i,t))?s:{value:n,configurable:!0,writable:!0};return Object.defineProperty(e,t,o),null!==r.set||r.calls.length>0||r.innerSet.size>0?[r]:[]}}getFreezeOptions(e){return{content:"string"==typeof e.textContent,style:"string"==typeof e.backgroundColor||"string"==typeof e.textColor||"string"==typeof e.borderColor}}applyFreezeChanges(e){for(let t of e){for(let[e,i]of(null!==t.set&&(t.object[t.property]=t.set),t.innerSet.entries()))t.object[t.property][e]=i;for(let e of t.calls)t.object[t.property](...e)}}constructor(e,t,i){this.original=e,this.state="original",this.config={},this.type="NodeFreezingStrategy",this.uuid=O()(),this.selector=t,this.enhancedProxyFreezing=null!=i&&i,this.snapshot()}}class io{get(e){var t;let i=Array.from(this.elementToStrategiesMap.values()).find(t=>t.selector===e);return i&&null!=(t=i.get())?t:null}getSelector(e){var t,i;return null!=(i=null==(t=this.elementToStrategiesMap.get(e))?void 0:t.selector)?i:null}add(e,t){if(e){let t=this.elementToStrategiesMap.get(e);if(null==t?void 0:t.get().isConnected)return e}if(!e)return null;let i=this.retrieveStrategy(e,t);for(let e of this.observers)i.addObserver(e);return this.elementToStrategiesMap.set(e,i),i.get()}applyLoading(e,t){if(!e)return;let i=this.elementToStrategiesMap.get(e);if(i)return i.applyLoading(t),i.uuid}removeLoadingByUuid(e){let t=Array.from(this.elementToStrategiesMap.values()).find(t=>t.uuid===e);t&&t.removeLoading()}personalize(e,t){if(!e)return;let i=this.elementToStrategiesMap.get(e);i&&i.personalize(t)}revert(e){let t=this.elementToStrategiesMap.get(e);t&&t.revert()}reset(){this.elementToStrategiesMap.forEach(e=>e.revert())}remove(e){if(!e)return;let t=this.elementToStrategiesMap.get(e);if(t)for(let e of(t.revert(),this.observers))t.removeObserver(e);this.elementToStrategiesMap.delete(e)}removeAll(){this.elementToStrategiesMap.forEach(e=>{for(let t of(e.revert(),this.observers))e.removeObserver(t)}),this.elementToStrategiesMap.clear()}addObserver(e){this.observers.push(e),this.elementToStrategiesMap.forEach(t=>{t.addObserver(e)})}removeObserver(e){this.observers.splice(this.observers.indexOf(e),1),this.elementToStrategiesMap.forEach(t=>{t.removeObserver(e)})}retrieveStrategy(e,t){return new is(e,t,this.enhancedProxyFreezing)}constructor(e=!1){this.observers=[],this.elementToStrategiesMap=new Map,this.enhancedProxyFreezing=e}}class ia{start(){this.debugLog("starting"),this.observer.observe(document,{childList:!0,subtree:!0}),this.revertTimeoutHandle=setTimeout(this.revert.bind(this),3e3)}stop(e){void 0===e&&(e=!1),this.debugLog("stopping"),this.observer.disconnect(),"number"==typeof this.requestAnimationFrameHandle&&cancelAnimationFrame(this.requestAnimationFrameHandle),e&&clearTimeout(this.revertTimeoutHandle)}revert(){this.debugLog("reverting"),"number"==typeof this.requestAnimationFrameHandle&&cancelAnimationFrame(this.requestAnimationFrameHandle),this.manager.reset()}observeSelectors(e){for(let{target:t}of e){let{shouldProcess:e,selector:i}=this.shouldProcessElement(t);if(!e)continue;let n=this.manager.add(t,i);0===this.processElementsQueue.length&&(this.requestAnimationFrameHandle=requestAnimationFrame(this.processElements.bind(this))),this.processElementsQueue.push(n),this.processedElements.add(n)}}shouldProcessElement(e){var t;if(!(e instanceof HTMLElement)||!e.matches(tb.XY)||this.processedElements.has(e))return{shouldProcess:!1};let i=null==(t=this.selectors.find(t=>{let{selector:i}=t;return e.matches(i)}))?void 0:t.selector;return i?(this.debugLog("found selector "+i),{shouldProcess:!0,selector:i}):{shouldProcess:!1}}processElements(){for(let e of this.processElementsQueue)this.manager.applyLoading(e,"icon");this.processElementsQueue=[]}debugLog(e,t){(0,tb.dI)("[personalization-observer] "+e,t)}constructor(e){this.selectors=e,this.processedElements=new Set,this.processElementsQueue=[],this.manager=new io,this.observer=new MutationObserver(this.observeSelectors.bind(this))}}var il=__webpack_require__(4796);function ic(e){for(var t=1;t{if(iu.get("__hstc"))t(iu.get("__hstc"));else if(window._hsq){let i=Date.now(),n=setInterval(()=>{iu.get("__hstc")?(clearInterval(n),t(iu.get("__hstc"))):Date.now()-i>e&&(clearInterval(n),t(void 0))},200)}else t(void 0)})}},im=class{async getToken(){return new Promise(e=>{if(iu.get("_mkto_trk"))e(iu.get("_mkto_trk"));else if(window.Munchkin){let t=Date.now(),i=setInterval(()=>{iu.get("_mkto_trk")?(clearInterval(i),e(iu.get("_mkto_trk"))):Date.now()-t>1e3&&(clearInterval(i),e(void 0))},200)}else e(void 0)})}},ig=class{async getIdentities(){let e,t,i={};eL.startActiveSpanAsync("Pardot Get Prospect Email",{},this.telemetryCtx,async t=>{e=this.getProspectEmail();try{i.prospectEmail=await e}catch(e){}finally{t.end()}}),eL.startActiveSpanAsync("Pardot Get Visitor Id",{},this.telemetryCtx,async e=>{t=this.getVisitorId();try{i.visitorId=await t}catch(e){}finally{e.end()}});let n=Promise.allSettled([e,t]);return await Promise.any([e,n,(0,Y.cb)(750)]),i.prospectEmail||await Promise.any([e,t,n,(0,Y.cb)(1250)]),e.cancel(),t.cancel(),i}getVisitorId(){let e,{accountId:t}=this.config,i=()=>{},n=new Promise((n,r)=>{i=r;let s=()=>iu.get("visitor_id"+t);s()?n(s()):window.parseInt(window.piAId||"",10)-1e3===parseInt(t,10)?e=window.setInterval(()=>{let e=s();e&&n(e)},50):r()}).finally(()=>{window.clearInterval(e)});return n.cancel=i,n}getProspectEmail(){let{trackerDomain:e,accountId:t,dynamicContentId:i}=this.config;if(!i){let e=Promise.reject();return e.cancel=()=>{},e}let n=document.createElement("script"),r=document.write,s=()=>{},o=new Promise((o,a)=>{s=a,document.write=function(e){let t=/\*QUALIFIED\*(.*)\*QUALIFIED\*/.exec(e);if(t){let e=t[1].trim();""!==e?o(e):a()}else r(e)},n.src="//"+e+"/dcjs/"+t+"/"+i+"/dc.js",document.body.appendChild(n)}).finally(()=>{document.write=r});return o.cancel=s,o}constructor(e){this.config=e,this.telemetryCtx=eN()}},iv={memoizeShadowRoots:!0,shadowHostSelectorFilter:"*"};class ib{get shadowRoots(){if(this.options.memoizeShadowRoots){var e;return null!=(e=this._shadowRoots)?e:this._shadowRoots=this.getShadowRoots()}return this.getShadowRoots()}querySelector(e){let t=document.querySelector(e);if(t)return t;for(let i of this.shadowRoots)if(t=i.querySelector(e))return t;return null}querySelectorAll(e){let t=[document.querySelectorAll(e)];for(let i of this.shadowRoots)t.push(i.querySelectorAll(e));let i=[];for(let e of t)i.push(...e);return i}getShadowRoots(e,t){return void 0===e&&(e=document),void 0===t&&(t=new Set),e.querySelectorAll(this.options.shadowHostSelectorFilter).forEach(e=>{e.shadowRoot&&(t.add(e.shadowRoot),this.getShadowRoots(e.shadowRoot,t))}),t}constructor(e={}){this._shadowRoots=null,this.options=(0,S._)({},iv,e)}}let iy=class{get hasEndedInitSpan(){return this.initSpan&&0!==this.initSpan.endTime}get hasExperimentSelectors(){return this.experimentSelectors&&this.experimentSelectors.length>0}get experimentSelectors(){return this.config.experimentSelectors}constructor(e,t=new io){this.config=e,this.personalizationManager=t,this.donePersonalizing=!1,this.intermediateStateType="icon",this.selectorMetadata=new Map,this.shadowDomHelper=new ib,this.lookupSelectorMetadata=e=>this.selectorMetadata.get(e),this.onPersonalizeWebsite=e=>{this.trace("Apply Personalizations",()=>{for(let t of e){let e=this.personalizationManager.get(t.selector);e&&(this.personalizationManager.personalize(e,{textContent:t.dom_update.text_content,backgroundColor:t.dom_update.background_color,borderColor:t.dom_update.border_color,textColor:t.dom_update.text_color}),this.selectorMetadata.get(t.selector).experimentArmId=t.experiment_arm_id,this.emitPersonalizationActivity(t.selector,t.experiment_arm_id))}this.donePersonalizing=!0}),this.endInitSpan()},this.initCurrentExperimentSelectors=()=>{this.experimentSelectors.forEach(e=>{let{url:t,selector:i}=e;if(!J(this.normalizedCurrentURL,X(t),t.endsWith("*")))return;if(this.personalizationManager.get(i))return void this.selectorMetadata.set(i,{emittedInView:!1});let n=this.shadowDomHelper.querySelector(i),r=this.personalizationManager.add(n,i);r&&(this.selectorMetadata.set(i,{emittedInView:!1}),this.personalizationManager.applyLoading(r,this.intermediateStateType))}),this.initIntersectionObserver()},this.initIntersectionObserver=()=>{if(!this.config.activityEmitter)return;let e=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting&&e.target instanceof HTMLElement){let t=this.personalizationManager.getSelector(e.target);t&&this.emitInView(t)}})},{root:null,threshold:1});this.personalizationManager.addObserver(e)},this.trace=(e,t)=>{let i=this.hasEndedInitSpan?this.initSpan:null;eL.startActiveSpan(e,{},i,e=>{t(),e.end()})},this.endInitSpan=()=>{this.initSpan&&!this.hasEndedInitSpan&&this.initSpan.end()},this.resetElements=()=>{this.donePersonalizing||(this.trace("Revert Experiment Selectors",()=>this.personalizationManager.reset()),this.endInitSpan())},this.emitPersonalizationActivity=(e,t)=>{this.config.activityEmitter&&(t?this.config.activityEmitter.emitPersonalizationApplied({experimentArmId:t,selector:e}):this.config.activityEmitter.emitPersonalizationFallback({selector:e}))},this.emitInView=e=>{if(!this.config.activityEmitter)return;let t=this.selectorMetadata.get(e);if(!t)return;let{experimentArmId:i,emittedInView:n}=t;n||(this.config.activityEmitter.emitPersonalizationInView({selector:e,experimentArmId:i}),t.emittedInView=!0)};const{currentUrl:i}=e;if(this.initSpan=eL.startSpan("Evaluating Personalization",{},null)||null,this.normalizedCurrentURL=X(i),!this.hasExperimentSelectors){this.donePersonalizing=!0;return}this.trace("Initialize Experiment Selectors",this.initCurrentExperimentSelectors),setTimeout(this.resetElements,3e3)}};class i_{get textContent(){return(0,tb.Z$)(this.selector)}get href(){return(0,tb.ko)(this.selector)}get isLegacyTrigger(){return this.legacy}get scopePrecedence(){if(this.legacy)return 100;if(void 0===this.textContent&&void 0===this.href&&!this.global)return 10;if(void 0===this.textContent&&void 0===this.href&&this.global)return 20;if(void 0!==this.href&&!this.global)return 30;if(void 0!==this.textContent&&!this.global)return 40;if(void 0!==this.href&&this.global)return 50;else if(void 0!==this.textContent&&this.global)return 60;else return 99}constructor(e){this.url=e.url,this.selector=e.selector,this.api=e.api,this.global=e.global,this.legacy=e.legacy}}let iw=class{get normalizedCurrentURL(){return X(window.location.href)}get triggerSelectors(){return this.currentTriggerQuerySelectors}get hasCurrentTriggerSelectors(){return Object.keys(this.triggerSelectors).length>0}matchingSelector(e){let t=Object.keys(this.currentTriggerQuerySelectors).find(t=>(0,tb.Nz)(e,t));return this.debugLog("Matched trigger "+t),t}get currentTriggers(){return(0,tb.cR)(this.websiteConfigs.filter(e=>{let{url:t,global:i}=e;return this.hasURLMatch(t,i)}))}hasURLMatch(e,t){return J(this.normalizedCurrentURL,X(e),t)}get oldTriggers(){return Object.entries(this.smartCtaTriggers).reduce((e,t)=>{let[i,n]=t;return"WEBSITE_CONFIGS"!==i&&e.push(function(e){let{selector:t,api:i}=e;return new i_({url:"",selector:t,api:i,global:!1,legacy:!0})}({selector:i,api:n})),e},[])}get currentTriggerQuerySelectors(){let e=this.currentTriggers.reduce((e,t)=>{let{selector:i,api:n}=t;return e[i]?this.debugLog("Skipping duplicate trigger "+i+" for "+n):e[i]=n,e},{});return this.oldTriggers.forEach(t=>{let{selector:i,api:n}=t;e[i]?this.debugLog("Skipping duplicate trigger "+i+" for "+n):e[i]=n}),e}get smartCtaTriggers(){return this.config.smartCtaTriggers}get websiteConfigs(){return this.smartCtaTriggers.WEBSITE_CONFIGS&&"string"!=typeof this.smartCtaTriggers.WEBSITE_CONFIGS?this.smartCtaTriggers.WEBSITE_CONFIGS.map(e=>new i_((0,S._)({},e,{legacy:!1}))):[]}constructor(e){this.isDebug=!1,this.debugLog=e=>{this.isDebug&&console.log("[Qualified] "+e)},document.location.search&&(this.isDebug=(0,tb.Bb)(),this.debugLog("[DEBUG MODE]")),this.config=e}},iE=["scroll","mousemove","click","touchstart","keypress"],iA=Symbol("FALLBACK_EVENT"),iS="QUALIFIED_FALLBACK_EVENT",ix=["text","field_entry","lightbox_gather","calendar_event_offer"];var iC=(0,o._)("_onVisibilityChange");class iT extends u.A{async init(){var e,t;if(this.telemetryCtx=eN(),this.widget.logTiming("Time to init tracker","widget_time_to_init_tracker_ms"),iE.forEach(e=>{this.callOnDispose((0,F.q2)(window,e,this.eventHandler,{capture:!0}))}),this.callOnDispose((0,F.q2)(window,"visibilitychange",(0,s._)(this,iC)[iC],{capture:!0})),this.callOnDispose((0,F.q2)(window,"pagehide",this.onPageHide,{capture:!0})),this.callOnDispose(()=>{var e;return null==(e=this.widget.personalizationObserver)?void 0:e.stop()}),this.callOnDispose(()=>this.handleButtonTriggers.cancel()),(null==(e=this.config.pardotConfig)?void 0:e.accountId)&&await eL.startActiveSpanAsync("Init pardot",{},this.telemetryCtx,async e=>{if(!this.config.pardotConfig)return;let t=await new ig(this.config.pardotConfig).getIdentities();this.setInitializationParams({pardot:{prospect_email:t.prospectEmail,visitor_id:t.visitorId}}),e.end()}),this.isDisposed||(this.config.hasMarketo&&await eL.startActiveSpanAsync("Init marketo",{},this.telemetryCtx,async e=>{let t=await new im().getToken();void 0!==t&&this.setInitializationParams({marketo:{token:t}}),e.end()}),this.isDisposed)||(this.config.hasHubSpot&&await eL.startActiveSpanAsync("Init hubspot",{},this.telemetryCtx,async e=>{let t=await new ip().getToken(this.widget.config.hubspotTokenRetrievalTimeout);void 0!==t&&this.setInitializationParams({hubspot:{token:t}}),e.end()}),this.isDisposed)||(this.config.hasEloqua&&await eL.startActiveSpanAsync("Init eloqua",{},this.telemetryCtx,async e=>{let t=new id().getToken();void 0!==t&&this.setInitializationParams({eloqua:{token:t}}),e.end()}),this.isDisposed))return;if(this.visitor.smartFormData&&(this.config.hasSmartForms&&this.widget.iframeManager.showLightboxLoading(),this.setInitializationParams({smart_form:{field_values:this.visitor.smartFormData.fieldValues,bot_api_name:this.visitor.smartFormData.botApiName}}),this.visitor.clearSmartFormData()),!this.widget.isMeetingLink){let e=!!(this.visitor.lastValidRebroadcastTime&&this.visitor.lastValidRebroadcastTime>this.widget.dateProvider.new().getTime());e&&this.widget.debugLog("[Qualified] Page loaded within the valid rebroadcast period, and thus is going to rebroadcast the last element conversation."),eR(this.telemetryCtx,()=>{this.createPageView({singlePageApp:!1,reconnecting:!1,rebroadcast:e,qualifiedRedirected:this.visitor.qualifiedRedirected})}),this.visitor.setQualifiedRedirect(void 0),this.visitor.setLastValidRebroadcastTime(void 0)}let i=new URLSearchParams(window.location.search);if(i.has("q_offer_info")){let e,n;try{({id:e,expiration:n}=JSON.parse((0,il.Ey)(null!=(t=i.get("q_offer_info"))?t:"")))}catch(e){this.widget.debugLog("Error parsing offer info: "+e)}e&&n&&n>this.dateProvider.now()&&this.pageViewActivityEmitter.emitOfferLanded({offerVersionId:e});let r=new URL(window.location.href);r.searchParams.delete("q_offer_info"),window.history.replaceState(window.history.state,"",r.toString())}this.updatePageVisible(),this.channel.emit("initTrackerCreatePageView"),this.initializationParams={},this.initialize()}startBehaviorTracker(){var e;this.timerStartedAt=Date.now();let t=(null==(e=this.config.featureFlags)?void 0:e.offerAgentChatAutoPounce)?5:10,i=(0,Y.Si)(500,()=>{this.timerStartedAt&&(this.timerTimeOnSite=Date.now()-this.timerStartedAt),(this.iframeManager.apMessagesCount>=2||this.iframeManager.autoRespondPounceCount>=2||this.iframeManager.userResponded||this.iframeManager.visitorResponded)&&o(),this.timerTimeOnSite>1e3*t&&(this.metActiveThreshold(),o())}),n=(0,F.q2)(window,"focus",()=>{this.timerStartedAt=Date.now()}),r=(0,F.q2)(window,"blur",()=>{this.timerStartedAt=null}),s=(0,F.q2)(window,"visibilitychange",()=>{"visible"===document.visibilityState?this.timerStartedAt=Date.now():this.timerStartedAt=null}),o=()=>{s(),n(),r(),i()}}closestSelector(e,t){return Object.keys(t).find(t=>{let i=t+", "+t+" *",n=e.matches(i);return n&&this.widget.debugLog("trigger "+i+" matched"),n})}handleTriggers(e,t,i){let n,r;this.widget.debugLog("Handling "+i+" triggers: "+JSON.stringify(t));let s=this.featureFlags.smartCtaNestedTriggersSupport?Element:HTMLElement;r="SMART_CTA"===i?e=>{var t;return e instanceof s&&!!(n=null==(t=this.smartWebsiteConfig)?void 0:t.matchingSelector(e))}:e=>e instanceof s&&!!(n=this.closestSelector(e,t));let o=(0,F.wt)(e,{filterFn:r,hasShadowDomSupport:this.featureFlags.smartCtaShadowDomSupport,nestedTriggersSupport:this.featureFlags.smartCtaNestedTriggersSupport});n&&o&&(e.preventDefault(),e.stopPropagation(),this.waitingForFallbackEvent||this.afterInit(async()=>{await this.widget.initialized,this.lastButtonTriggerEvent={event:e,target:o,selector:n},this.hijackClick(i,t[n],this.lastButtonTriggerEvent),this.recordClickActivity(e)}))}initialize(){this.initialized=!0,this.afterInitQueue.forEach(e=>e()),this.afterInitQueue=[]}setInitializationParams(e){if(this.initialized)throw Error("Tracker already initialized!");Object.assign(this.initializationParams,e)}constructor(e){var t,i,n,r,o,a;super(e),Object.defineProperty(this,iC,{writable:!0,value:void 0}),this.initialized=!1,this.timerStartedAt=null,this.experienceLoadingStartTimeMap=new Map,this.lastButtonTriggerEvent=null,this.isBotRedirecting=!1,this.waitingForFallbackEvent=!1,this.eventHandler=e=>{("mousemove"!==e.type||document.hasFocus())&&this.registerActivity(),"click"!==e.type||e.target&&(iA in e&&e[iA]===iS&&(this.waitingForFallbackEvent=!1),this.handleButtonTriggers(e))},this.handleButtonTriggers=tF()(e=>{this.widget.isMeetingLink||iA in e&&e[iA]===iS||e.target instanceof Element&&(0,tb.U3)(e.target)||(this.handleSmartCtaTriggers(e),this.handleManualBotTriggers(e))},100,{leading:!0,trailing:!1}),this.recordClickActivity=e=>{if(e.target instanceof Element&&this.pageViewActivityEmitter&&this.smartWebsiteConfig){let i=this.smartWebsiteConfig.matchingSelector(e.target);if(i){var t;let e=null==(t=this.personalizationsConfig)?void 0:t.lookupSelectorMetadata(i);this.pageViewActivityEmitter.emitPersonalizationClick({selector:i,experimentArmId:null==e?void 0:e.experimentArmId})}}},this.updatePageVisible=()=>{this.navigating||(this.pageVisible=(0,F.n)())},this.registerActivity=tF()(()=>{if(!this.isDisposed&&(this.widget.registerClientActivity(),this.expiredFromInactivity&&document.hasFocus())){var e;this.expiredFromInactivity=!1,null==(e=this.channel.connect())||e.then(()=>{this.widget.isMeetingLink?this.recordMeetingLinkLoad():this.createPageView(),this.initialize(),this.initializationParams={}})}},200),this.hijackClick=tF()(async(e,t,i)=>{let n,{target:r,selector:s,event:o}=i,a=O()(),l=performance.now();if(this.experienceLoadingStartTimeMap.set(a,l),"MANUAL"===e)this.config.hasMeetingBookerExperienceBuilder?this.widget.iframeManager.showLightboxLoading():this.widget.iframeManager.showMessengerLoading();else if("SMART_CTA"===e)try{th.startButtonClickSpan();let e=this.featureFlags.smartCtaNestedTriggersSupport?r.closest(tb.XY):r;this.personalizationManager.add(e,s),(n=this.personalizationManager.applyLoading(e,"spinner"))&&this.widget.iframeManager.showInlineLoading(n)}catch(e){this.widget.debugLog("Failed to add inline spinner "+e.message),this.widget.serverLog({message:e.message,type:"both",extra:{event:"meeting_progress_loading_bar_error"}})}this.widget.debugLog("Showing experience for trigger ["+a+"]: "+s),this.showExperience(t,void 0,a);let c=(0,Y.Pl)(5e3,()=>{this.experienceLoadingStartTimeMap.has(a)&&(this.widget.debugLog("Experience timed out ["+a+"]: "+s),this.widget.iframeManager.closeLightbox(),n&&this.personalizationManager.removeLoadingByUuid(n),this.dispatchFallbackEvent({event:o,target:r,selector:s}))});this.callOnDispose(c)},1200,{leading:!0,trailing:!1}),this.handleManualBotTriggers=e=>{this.handleTriggers(e,this.config.manualBotTriggers,"MANUAL")},this.handleSmartCtaTriggers=e=>{var t;(null==(t=this.smartWebsiteConfig)?void 0:t.hasCurrentTriggerSelectors)&&this.handleTriggers(e,this.smartWebsiteConfig.triggerSelectors,"SMART_CTA")},this.afterInit=e=>{this.initialized?e():this.afterInitQueue.push(e)},this.handlePardotFormSubmitted=async e=>{void 0===e&&(e="default"),await eL.startActiveSpanAsync("Pardot form submitted",{},this.telemetryCtx,async t=>{let i=this.config.pardotConfig?await new ig(this.config.pardotConfig).getIdentities():{};this.isDisposed||(this.channel.send({event:"pardotFormSubmitted",payload:{bot_api_name:e,pardot_prospect_email:i.prospectEmail,pardot_visitor_id:i.visitorId}}),t.end())})},this.handleSmartFormSubmitted=(e,t)=>{void 0===t&&(t="default"),this.channel.send({event:"smartFormSubmitted",payload:{field_values:e,bot_api_name:t}})},this.showExperience=(e,t,i)=>{void 0===e&&(e="default"),this.channel.perform("show_experience",{api_name:e,initial_client_state:t,transaction:i})},this.showFormExperience=(e,t)=>{var i,n,r;if(!this.config.hasSmartForms)return;let s=e||(null==(i=this.widget.visitor.smartFormData)?void 0:i.botApiName),o=(null==(n=this.widget.visitor.formData)?void 0:n.fieldValues)||(null==(r=this.widget.visitor.smartFormData)?void 0:r.fieldValues);this.channel.perform("show_form_experience",{bot_api_name:s,field_values:o,form_data:this.widget.visitor.formData,form_destinations:t}),this.widget.visitor.clearSmartFormData(),this.widget.visitor.clearFormData()},this.showExperienceForForm=(e,t,i)=>{var n,r;(void 0===i&&(i=!1),this.config.hasSmartForms)?t.formActionUrl&&!this.config.formBotTriggers.pardot.includes(null==(n=t.formActionUrl)?void 0:n.replace(/^https?:\/\//,""))?this.widget.debugState.logEvent("tracker:showExperienceForForm","error",{},"Form action URL is not in the list of Pardot form action URLs"):(i?(this.widget.visitor.setFormExperienceDataWithExpiry({formType:e,formData:t}),window.postMessage({source:"qualified",token:this.config.token,message:"done",verb:"showExperienceForForm"},window.location.origin)):(th.startSubmitFormSpan({"form.type":e,"form.with_redirect":!1}),this.widget.iframeManager.showLightboxLoading(),this.channel.perform("show_experience_for_form",{form_type:e,form_data:{raw:t.raw||t,form_id:t.formId,form_email:t.formEmail,form_action_url:null==(r=t.formActionUrl)?void 0:r.replace(/^https?:\/\//,"")}})),this.widget.debugState.logEvent("tracker:showExperienceForForm","success",{})):this.widget.debugState.logEvent("tracker:showExperienceForForm","error",{},"smart_forms flag is not enabled")},this.metActiveThreshold=()=>{let e=document.querySelector('meta[name="description"]'),t=null;e instanceof HTMLMetaElement&&(t=e.content),this.channel.perform("met_active_threshold",{title:this.resolveTitle(),description:t,source:this.iframeManager.apMessagesCount>0?"auto_pounce":"auto_respond"})},this.resolveTitle=()=>{let{originalDocumentTitle:e}=this.iframeManager,t=document.title,i=null!=e?e:t;if(i.startsWith("Message from")){var n;this.widget.serverLog({message:"Resolved title is flash title for met_active_threshold",extra:{original_document_title:null!=(n=this.iframeManager.originalDocumentTitle)?n:"original_document_title was null or undefined",document_title:document.title,url:window.document.location.href}})}return i.startsWith("Message from")?null:i},this.getIdentity=()=>{this.channel.send({event:"getIdentity",payload:{}})},this.setFieldValues=e=>{this.channel.send({event:"setFieldValues",payload:{field_values:e}})},this.recordMeetingLinkLoad=e=>{void 0===e&&(e=void 0);let t=Object.assign({},this.initializationParams,{wu:this.widget.widgetId,url:document.location.href,wv:this.config.version,referrer:document.referrer,mlt:e||this.widget.meetingLinkToken});return this.channel.perform("record_meeting_link_load",t)},this.recordPrivacyDisclosure=(e,t)=>{let i,n=(i=(e=>{switch(e){case"zh-CN":return"zh_CN";case"zh-TW":return"zh_TW";case"es-419":return"es_LA";case"pt-BR":return"pt_BR";default:return e.split("-")[0]}})(navigator.language))in tL?i:"en";return this.channel.perform("record_privacy_disclosure",{target:e,conversation_id:t,meeting_link_locale:n})},this.recordPrivacyDisclosureConsent=e=>{if(e.type&&ix.includes(e.type))return this.channel.perform("record_privacy_disclosure_consent",{message_id:e.id})},this.createPageView=e=>{let{singlePageApp:t,reconnecting:i,rebroadcast:n,qualifiedRedirected:r}=void 0===e?{singlePageApp:!1,reconnecting:!1,rebroadcast:!1,qualifiedRedirected:!1}:e,s=eN();if(t&&document.location.href===this.lastPageViewUrl||t&&!this.initialized)return;this.lastPageViewUrl=document.location.href;let o=Object.assign({},this.initializationParams,{wu:this.widget.widgetId,url:document.location.href,single_page_app:t,wv:this.config.version,referrer:document.referrer,reconnecting:i,rebroadcast:n,has_custom_form_data:this.visitor.hasFormData}),a=new URLSearchParams(document.location.search);return a.get("q_profiler_id")&&(o.q_profiler_id=a.get("q_profiler_id")),this.widget.debugLog("Show clientside lightbox loading","info",{rebroadcast:String(n),qualifiedRedirected:String(r)}),n&&!r&&this.widget.iframeManager.showLightboxLoading(),eR(s,()=>this.channel.perform("record_page_view",o))},this.logExperienceLoadingTime=e=>{let t=this.experienceLoadingStartTimeMap.get(e);if(!t)return;let i=performance.now()-t;this.widget.logTiming("Button experience loading time","buttons_time_to_socket_ms",i),this.experienceLoadingStartTimeMap.delete(e)},this.dispatchFallbackEvent=e=>{var t,i;let{event:n,target:r,selector:s}=e;if(n&&!this.isBotRedirecting){if(tR&&r instanceof HTMLAnchorElement&&r.href&&"string"==typeof r.target&&"_blank"===r.target.toLowerCase())window.location.href=r.href,this.waitingForFallbackEvent=!1;else{this.waitingForFallbackEvent=!0;let e=(0,F.EY)(n,{[iA]:iS});(null==r?void 0:r.isConnected)?r.dispatchEvent(e):s&&(null==(i=this.personalizationManager.get(s))||i.dispatchEvent(e))}n===(null==(t=this.lastButtonTriggerEvent)?void 0:t.event)&&(this.lastButtonTriggerEvent=null)}},(0,s._)(this,iC)[iC]=tP()(()=>{this.isDisposed||(this.updatePageVisible(),this.sendHeartbeat())},1e3),this.onPageHide=()=>{this.navigating=!0},this.onPing=()=>{this.pingCounter++%2==0&&this.sendHeartbeat()},this.sendHeartbeat=()=>{this.heartbeatManager.blocked||this.channel.send({event:"heartbeat",payload:{client_activity_at:this.widget.lastClientActivityAt,page_visible:this.pageVisible}})},this.onSessionEnded=()=>{this.channel.disconnect(),this.channel.connect()},this.onIdleTooLong=()=>{this.expiredFromInactivity=!0,this.initialized=!1,this.channel.disconnect()},this.onBotRedirect=()=>{this.visitor.setQualifiedRedirect(!0),this.isBotRedirecting=!0},this.onEndLoadingState=()=>{this.lastButtonTriggerEvent&&this.dispatchFallbackEvent(this.lastButtonTriggerEvent)},this.lastPageViewUrl="",this.pingCounter=0,this.navigating=!1,this.pageVisible=!0,this.expiredFromInactivity=!1,this.initializationParams={},this.telemetryCtx=void 0,this.afterInitQueue=[],this.timerStartedAt=null,this.timerTimeOnSite=0,this.config.smartCtaTriggers&&(this.smartWebsiteConfig=new iw({smartCtaTriggers:this.config.smartCtaTriggers})),this.personalizationManager=(null==(t=this.widget.personalizationObserver)?void 0:t.manager)||new io(null!=(o=null==(i=this.config.featureFlags)?void 0:i.smartCtaEnhancedFreezing)&&o),this.config.experimentSelectors&&this.config.experimentSelectors.length>0&&(null==(a=this.widget.personalizationObserver)||a.stop(!0),this.personalizationsConfig=new iy({experimentSelectors:this.config.experimentSelectors,currentUrl:window.location.href,activityEmitter:this.pageViewActivityEmitter},this.personalizationManager)),this.channel.on("ping",this.onPing),this.channel.on("sessionEnded",this.onSessionEnded),this.channel.on("idleTooLong",this.onIdleTooLong),this.channel.on("redirect",this.onBotRedirect),this.channel.on("endLoadingState",this.onEndLoadingState),this.channel.on("reconnected",()=>{this.initialized&&this.createPageView({singlePageApp:!1,reconnecting:!0,rebroadcast:!1})}),this.channel.on("personalizeWebsite",e=>{var t;return null==(t=this.personalizationsConfig)?void 0:t.onPersonalizeWebsite(e)}),this.channel.on("showExperienceEnd",this.logExperienceLoadingTime),this.channel.on("endInlineLoading",e=>{this.personalizationManager.removeLoadingByUuid(e)}),this.channel.on("widgetEvent",e=>this.widget.emitWidgetEvent(e)),this.channel.on("syncScriptState",e=>{this.widget.iframeManager.handleSyncScriptState(e)}),((null==(n=this.config.featureFlags)?void 0:n.demo)||(null==(r=this.config.featureFlags)?void 0:r.demoKillSessionShortcut))&&this.callOnDispose((0,F.q2)(document,"keydown",async e=>{if("k"===e.key&&(e.metaKey||e.ctrlKey)&&e.shiftKey){e.preventDefault(),await this.channel.perform("kill_session",{}),this.channel.disconnect();let t=document.createElement("div");t.style.cssText="position:fixed;bottom:10px;right:10px;width:10px;height:10px;background:#f44;border-radius:50%;z-index:2147483648",document.body.appendChild(t)}}))}}(0,x.Cg)([K.W,(0,x.Sn)("design:type","undefined"==typeof HeartbeatManager?Object:HeartbeatManager)],iT.prototype,"heartbeatManager",void 0),(0,x.Cg)([$.H],iT.prototype,"eventHandler",void 0),(0,x.Cg)([e5.Hi,(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",["undefined"==typeof Event?Object:Event,"undefined"==typeof TriggerQuerySelectors?Object:TriggerQuerySelectors,"undefined"==typeof BotType?Object:BotType]),(0,x.Sn)("design:returntype",void 0)],iT.prototype,"handleTriggers",null),(0,x.Cg)([$.H],iT.prototype,"onPageHide",void 0),(0,x.Cg)([$.H],iT.prototype,"onPing",void 0),(0,x.Cg)([$.H],iT.prototype,"onSessionEnded",void 0),(0,x.Cg)([$.H],iT.prototype,"onIdleTooLong",void 0),(0,x.Cg)([$.H],iT.prototype,"onBotRedirect",void 0),(0,x.Cg)([$.H],iT.prototype,"onEndLoadingState",void 0);let ik=["activeSessionId","promptAutoDismissed","scriptId","stateByScriptId"];var iI=__webpack_require__(2404),iO=__webpack_require__.n(iI);let iF={promptDismissed:!1},iM=class{get cookieDomain(){var e,t,i,n;if((null==(e=this.widget)?void 0:e.config.noCookieDomainTest)||/^[^a-z]+|localhost/.test(document.domain))return document.domain;let r=[],s=document.domain.split(".");if(null==(t=this.widget)||!t.config.exactMatchCookieDomains){for(let e=0;e<=s.length-2;e++)r.push(s.slice(s.length-2-e).join("."));for(let e of r)if(iu.set("__q_domainTest","1",{domain:e,sameSite:"lax",secure:null!=(n=this.widget)&&null!=(i=n.config.featureFlags)&&!!i.websiteUseSecureCookies||void 0}),"1"===iu.get("__q_domainTest"))return iu.remove("__q_domainTest",{domain:e}),e;throw Error("Qualified: invalid domain. Could not find a domain for "+document.domain)}}get isInitialized(){return!!this.get("uuid")}get attributes(){let e=iu.get(this.cookieName);return e?JSON.parse((0,il.Ey)(e)):{}}get(e){return e in iF?e in this.attributes?this.attributes[e]:iF[e]:this.attributes[e]||null}has(e){return e in this.attributes}update(e){var t,i,n,r,s;if(!(null==(t=this.widget)?void 0:t.config.cookieExpiration))throw Error("Qualified: invalid cookie expiration");let o=this.attributes,a=Object.assign(o,e,(null==(i=this.widget)?void 0:i.config.exactMatchCookieDomains)?{}:{cookieDomain:o.cookieDomain||this.cookieDomain});delete a.sessionActiveAt,iu.set(this.cookieName,(0,il.nk)(JSON.stringify(a)),{expires:this.widget.config.cookieExpiration,domain:a.cookieDomain,sameSite:"lax",secure:null!=(r=this.widget)&&null!=(n=r.config.featureFlags)&&!!n.websiteUseSecureCookies||void 0}),e.formExperienceData&&!iO()(this.attributes.formExperienceData,e.formExperienceData)&&(null==(s=this.widget)||s.debugLog("[Qualified] Failed to save formExperienceData to cookie: "+JSON.stringify(e.formExperienceData)))}delete(e){var t,i,n;if(!(null==(t=this.widget)?void 0:t.config.cookieExpiration))throw Error("Qualified: invalid cookie expiration");if(e in this.attributes){let t=(0,S._)({},this.attributes);delete t[e],iu.set(this.cookieName,(0,il.nk)(JSON.stringify(t)),{expires:this.widget.config.cookieExpiration,domain:t.cookieDomain,sameSite:"lax",secure:null!=(n=this.widget)&&null!=(i=n.config.featureFlags)&&!!i.websiteUseSecureCookies||void 0})}}destroy(){iu.remove(this.cookieName,{domain:this.cookieDomain})}constructor(e,t){this.isPersisted=!0,this.widget=e,this.cookieName=t}},iP=class{get isInitialized(){return!!this.attributes.uuid}get(e){return this.attributes[e]}has(e){return e in this.attributes}update(e){this.attributes=(0,S._)({},this.attributes,e)}destroy(){this.attributes={}}constructor(){this.isPersisted=!1,this.attributes={}}};function iD(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function iL(e){var t=function(e,t){if("object"!==iD(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==iD(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===iD(t)?t:String(t)}var iR=__webpack_require__(6439);let iN={promptDismissed:!1},iB="__q_domainTest";class iU{get isPersisted(){return"inMemory"!==this.storageType}set isPersisted(e){e!==this.isPersisted&&(e||(this.deleteAttributes(this.storageType),this.syncCheckHandle&&clearTimeout(this.syncCheckHandle),this.syncStatus="unknown",this.successfulSyncChecks=0,this.failedSyncChecks=0,this.syncCheckHandle=null),this.storageType=e?"cookie":"inMemory",this.syncAttributes())}get isInitialized(){return!!this.attributes.uuid}get(e){return e in iN?e in this.attributes?this.attributes[e]:iN[e]:this.attributes[e]||null}has(e){return e in this.attributes}update(e){this.setAttributes("inMemory",this.getUpdatedAttributes(e)),this.syncAttributes()}delete(e){if(e in this.attributes){let t=this.attributes,{[e]:i}=t,n=(0,eq._)(t,[e].map(iL));this.setAttributes("inMemory",n),this.syncAttributes()}}destroy(){this.deleteAttributes("inMemory"),this.syncAttributes()}copyFrom(e){this.update(e.attributes)}getInitialPersistedStorageType(){return iU.ALLOW_LOCAL_STORAGE_FALLBACK&&this.isLocalStorageAvailable()&&localStorage.getItem(this.name)?"localStorage":"cookie"}getUpdatedAttributes(e){var t;let i=(0,S._)({},this.attributes,e);return"cookie"!==this.storageType||(null==(t=this.supervisor)?void 0:t.config.exactMatchCookieDomains)||(i.cookieDomain=this.attributes.cookieDomain||this.getCookieDomain()),"sessionActiveAt"in i&&delete i.sessionActiveAt,i}getAttributes(e){try{switch(e){case"inMemory":return this.attributes;case"cookie":{let e=iu.get(this.name);return e?JSON.parse((0,il.Ey)(e)):{}}case"localStorage":{let e=localStorage.getItem(this.name);return e?JSON.parse((0,il.Ey)(e)):{}}default:(0,iR.d)(e)}}catch(e){return this.recordError(e),{}}}setAttributes(e,t){if(0===Object.keys(t).length)return void this.deleteAttributes(e);try{switch(e){case"inMemory":this.attributes=JSON.parse(JSON.stringify(t));break;case"cookie":var i,n;iu.set(this.name,(0,il.nk)(JSON.stringify(t)),{expires:this.supervisor.config.cookieExpiration,domain:"string"==typeof t.cookieDomain?t.cookieDomain:void 0,sameSite:"lax",secure:null!=(n=this.supervisor)&&null!=(i=n.config.featureFlags)&&!!i.websiteUseSecureCookies||void 0});break;case"localStorage":localStorage.setItem(this.name,(0,il.nk)(JSON.stringify(t)));break;default:(0,iR.d)(e)}}catch(e){this.recordError(e)}}deleteAttributes(e){try{switch(e){case"inMemory":this.attributes={};break;case"cookie":iu.remove(this.name,{domain:this.getCookieDomain()});break;case"localStorage":localStorage.removeItem(this.name);break;default:(0,iR.d)(e)}}catch(e){this.recordError(e)}}syncAttributes(){var e;if(this.isPersisted){if("cookie"===this.storageType&&!(null==(e=this.supervisor)?void 0:e.config.cookieExpiration)){this.recordError("Qualified: invalid cookie expiration"),this.failedSyncChecks=3,this.handleSyncFailure();return}if("localStorage"===this.storageType&&!this.isLocalStorageAvailable()){this.recordError("Qualified: local storage not available"),this.failedSyncChecks=3,this.handleSyncFailure();return}this.setAttributes(this.storageType,this.getAttributes("inMemory")),this.enqueueSyncCheck()}}enqueueSyncCheck(){"unknown"===this.syncStatus&&(null!==this.syncCheckHandle&&clearTimeout(this.syncCheckHandle),this.syncCheckHandle=setTimeout(()=>this.checkSynced(),1e3))}checkSynced(){(this.syncCheckHandle=null,iO()(this.getAttributes("inMemory"),this.getAttributes(this.storageType)))?this.handleSyncSuccess():this.handleSyncFailure()}handleSyncSuccess(){this.failedSyncChecks=0,++this.successfulSyncChecks>=10&&this.reportSyncSuccess()}reportSyncSuccess(){this.syncStatus="success",this.log("Sync successful")}handleSyncFailure(){if(this.successfulSyncChecks=0,this.setAttributes("inMemory",(0,S._)({},this.attributes,{cookieDomain:void 0})),++this.failedSyncChecks<3)return void this.syncAttributes();if(iU.ALLOW_LOCAL_STORAGE_FALLBACK&&"cookie"===this.storageType&&this.isLocalStorageAvailable()){this.log("Failed to use cookies to persist visitor state, using local storage instead"),this.failedSyncChecks=0,this.storageType="localStorage",this.deleteAttributes("cookie"),this.syncAttributes();return}this.reportSyncFailure()}reportSyncFailure(){this.syncStatus="failed",this.log("Failed to use "+this.storageType+" to persist visitor state")}getCookieDomain(){try{var e,t,i,n;if((null==(e=this.supervisor)?void 0:e.config.noCookieDomainTest)||/^[^a-z]+|localhost/.test(document.domain))return document.domain;let r=[],s=document.domain.split(".");if(null==(t=this.supervisor)?void 0:t.config.exactMatchCookieDomains)return;for(let e=0;e<=s.length-2;e++)r.push(s.slice(s.length-2-e).join("."));for(let e of r)if(iu.set(iB,"1",{domain:e,sameSite:"lax",secure:null!=(n=this.supervisor)&&null!=(i=n.config.featureFlags)&&!!i.websiteUseSecureCookies||void 0}),"1"===iu.get(iB))return iu.remove(iB,{domain:e}),e;this.recordError("Qualified: invalid domain. Could not find a domain for "+document.domain);return}catch(e){this.recordError(e);return}}isLocalStorageAvailable(){var e;return null!=(e=(0,c._p)(()=>!!localStorage.getItem(this.name)||!0))&&e}recordError(e){var t;"string"==typeof e&&(e=Error(e)),null==(t=(0,e_.N)())||t.captureException(e)}log(e){var t;this.storageType,this.isLocalStorageAvailable();let i={cookie:(0,c._p)(()=>document.cookie),domain:(0,c._p)(()=>document.domain),href:(0,c._p)(()=>document.location.href),persistence_storage_type:this.storageType,is_local_storage_available:String(this.isLocalStorageAvailable())},n="[Qualified VisitorState] "+e;null==(t=this.supervisor)||t.serverLog({message:n,extra:i}),(0,tb.Bb)()&&console.log(n,i)}constructor(e,t,i){this.supervisor=e,this.name=t,this.attributes={},this.storageType="inMemory",this.syncCheckHandle=null,this.successfulSyncChecks=0,this.failedSyncChecks=0,this.syncStatus="unknown",i&&(this.storageType=this.getInitialPersistedStorageType(),this.setAttributes("inMemory",this.getAttributes(this.storageType)),this.syncAttributes())}}iU.ALLOW_LOCAL_STORAGE_FALLBACK=!1;let ij=["messengerExpanded","promptDismissed","conversationId","forceHideConversationId"],iz="__q_state_",iq="__q_state";class iH extends u.A{static getUuid(e,t){return(void 0===t&&(t=!1),t)?new iU(null,iq,!0).get("uuid")||new iU(null,iz+e,!0).get("uuid"):new iM(null,iq).get("uuid")||new iM(null,iz+e).get("uuid")}async reportCookieError(e){let t={cookie:document.cookie,domain:document.domain,href:document.location.href};fetch(this.widget.resourceUrl("visitor_events"),{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({type:"both",event:e,extra:t})})}get uuid(){let e=this.state.get("uuid");if(e)return e;throw this.reportCookieError("Invalid visitor state, unable to read uuid."),Error("Qualified: invalid visitor state")}get botApiName(){return this.state.get("botApiName")}get formData(){return this.state.get("formData")}get hasFormData(){return void 0!==this.formData}get smartFormData(){return this.state.get("smartFormData")}get messengerState(){return ij.reduce((e,t)=>this.isAttributeEnabled(t)?(0,S._)({},e,{[t]:this.state.get(t)}):e,{})}set messengerExpanded(e){this.state.update({messengerExpanded:e})}set promptDismissed(e){this.state.update({promptDismissed:null==e||e})}set conversationId(e){this.state.update({conversationId:e})}set forceHideConversationId(e){this.state.update({forceHideConversationId:e})}setFormData(e){eh.isInDebugMode()&&(e.email?eh.setApiMessage("saveFormData","Success","“saveFormData” was called successfully."):eh.setApiMessage("saveFormData","Error","“saveFormData” was called but no email value was provided.")),this.state.update({formData:{fieldValues:e}})}setSmartFormData(e,t){eh.isInDebugMode()&&(e.email?eh.setApiMessage("saveSmartFormData","Success","“saveSmartFormData” was called successfully for "+t+" with the following field values: "+JSON.stringify(e)+"."):eh.setApiMessage("saveSmartFormData","Error","“saveSmartFormData” was called but no email value was provided.")),this.state.update({smartFormData:{fieldValues:e,botApiName:t}})}clearFormData(){this.state.update({formData:void 0})}clearSmartFormData(){this.state.update({smartFormData:void 0})}get lastValidRebroadcastTime(){return this.state.get("lastValidRebroadcastTime")}setLastValidRebroadcastTime(e){this.state.update({lastValidRebroadcastTime:e})}get qualifiedRedirected(){return this.state.get("qualifiedRedirected")}setQualifiedRedirect(e){this.state.update({qualifiedRedirected:e});let t=this.config.hasWebsiteCloseChatOnMobileRedirect;if(!e||!t)return;let i=this.state.get("conversationId");i&&(0,C.A)().any&&this.state.update({forceHideConversationId:i})}get formExperienceData(){let e=this.state.get("formExperienceData");return e?e.expiry&&this.widget.dateProvider.new().getTime()>e.expiry?(this.clearFormExperienceData(),null):e:null}setFormExperienceData(e){this.state.update({formExperienceData:e})}setFormExperienceDataWithExpiry(e,t){void 0===t&&(t=6e4),this.setFormExperienceData((0,S._)({},e,{expiry:this.widget.dateProvider.new().getTime()+t})),this.widget.debugState.logEvent("visitor:setFormExperienceDataWithExpiry","success",{})}clearFormExperienceData(){this.state.update({formExperienceData:void 0})}updatePersistence(e){if(this.state instanceof iU){this.state.isPersisted=e;return}if(this.state.isPersisted===e)return;let t=this.state;!t.isPersisted&&e?this.state=new iM(this.widget,iz+this.config.token):this.state=new iP,this.state.update(t.attributes),t.destroy()}reset(){this.state.destroy()}resourceUrl(e,t){return this.widget.resourceUrl(e,(0,S._)({uuid:this.uuid},t))}clearDeprecatedAttrs(){try{ik.forEach(e=>{this.state.isPersisted&&this.state.has(e)&&this.state.delete(e)})}catch(e){try{this.widget.serverLog({message:"Failed to clear deprecated attrs: "+e,type:"sentry"})}catch(e){console.warn("Failed to call serverLog in clearDeprecatedAttrs:",e)}}}createOldState(){let e;if(this.widget.isMeetingLink||this.config.requiresCookieConsent&&!this.config.hasCookieConsent)e=new iP;else if(!(e=new iM(this.widget,iz+this.config.token)).isInitialized){let t=new iM(this.widget,iq);t.isInitialized&&(e.update(t.attributes),t.destroy())}return e.isInitialized||e.update({uuid:O()()}),e}createState(){let e=iz+this.config.token,t=!this.widget.isMeetingLink&&!(this.config.requiresCookieConsent&&!this.config.hasCookieConsent),i=new iU(this.widget,e,t);if(!i.isInitialized&&t){let e=new iU(this.widget,iq,!0);e.isInitialized&&(i.copyFrom(e),e.destroy())}return i.isInitialized||i.update({uuid:O()()}),i}isAttributeEnabled(e){return"forceHideConversationId"!==e||!!(0,C.A)().any&&(!!this.config.hasWebsiteCloseChatOnMobileRedirect||this.state.has("forceHideConversationId"))}constructor(e){var t;super(e),this.state=(null==(t=this.config.featureFlags)?void 0:t.websiteVisitorStateV2)?this.createState():this.createOldState(),this.clearDeprecatedAttrs()}}let iV=["apiReady","sessionCreated","widgetInitialized"];class iW extends(0,K._)((0,$.j)(Object)){static createContainer(){let e=new tv;return e.register1("widget",this),e.register1("channel",tm),e.register1("tracker",iT),e.register1("iframeManager",tX),e.register1("apiHandler",e4),e.register1("cursorPositionProvider",tk),e.register1("dateProvider",tI),e.register1("locationProvider",it),e.register1("pageViewActivityEmitter",ii),e.register1("contentActivityEmitter",ty),e.set("heartbeatManager",{blocked:!1}),e.register("visitor",iH),e}static start(e){e&&(this.environmentConfig=e);let t=this.createContainer();return null==window.__test_container_is_created||window.__test_container_is_created.call(window,t),t.resolve("widget",this.environmentConfig),null==window.__test_widget_is_created||window.__test_widget_is_created.call(window,t),window[window.QualifiedObject]}get visitor(){if(this._visitor)return this._visitor;throw Error("Visitor not initialized on Widget")}get channel(){if(this._channel)return this._channel;throw Error("Channel not initialized on Widget")}get tracker(){if(this._tracker)return this._tracker;throw Error("Tracker not initialized on Widget")}get iframeManager(){if(this._iframeManager)return this._iframeManager;throw Error("IframeManager not initialized on Widget")}get offerScript(){return this._offerScript}get pageViewActivityEmitter(){if(this._pageViewActivityEmitter)return this._pageViewActivityEmitter;throw Error("PageViewActivityEmitter not initialized on Widget")}get contentActivityEmitter(){var e;return null!=(e=this._contentActivityEmitter)?e:this._contentActivityEmitter=this.container.resolve("contentActivityEmitter")}resourceUrl(){for(var e=arguments.length,t=Array(e),i=0;idocument.location.pathname.match("^"+e+"$"))){let e=this.container.classFor("visitor").getUuid(this.config.token,null==(t=this.config.featureFlags)?void 0:t.websiteVisitorStateV2);return!e||!!await fetch(this.resourceUrl("state/blacklisted",{uuid:e})).then(e=>e.json())&&(this.container.resolve("visitor").reset(),!0)}}isAllowedOrigin(e){var t;let n=!1;return(null==(t=this.config.domains)?void 0:t.length)===0?n=!0:(0,i._F)(this.config.domains||[],e)&&(n=!0),n?this.debugLog("url "+e+" passed isDomainMatch check using "+this.config.domains):this.debugLog("url "+e+" didn't pass isDomainMatch check using "+this.config.domains),n}async init(e,t){let i;void 0===t&&(t={});let n=eN();if(this.isDebug=new URLSearchParams(document.location.search).has("q_debug"),this.widgetInitializedAt=performance.now(),eS.setConfig(this.config),eS.setWidgetId(this.widgetId||""),1!==this.readyState&&e!==this.config.token)return void this.onTeardown()("initialize",e,t);if(this.loaded||!e)return this.abortInit();if(this.config.token=e,this.widget.logTiming("Time to init widget","widget_time_to_init_ms",this.widgetInitializedAt),this.config.host&&!this.config.host.includes("localhost")&&(0,e_.i)(this.resourceUrl("sentry/proxy")),this.syncInit(t),await eL.startActiveSpanAsync("Await DOMReady",{},n,async e=>{await (0,F.I_)(),e.end()}),this.isDisposed)return;if(this.lastClientActivityAt||this.registerClientActivity(),!t.isComplete){let e=await fetch(this.resourceUrl("configuration")),i=await e.json();if(this.isDisposed)return;t=(0,S._)({noCookieDomainTest:!0},t,i)}if(this.config=(0,S._)({},this.config,t),this.config.requiresCookieConsent=void 0!==this.config.hasCookieConsent,this.isIframed){this.readyState=3,this.apiHandler.markReady(),this.cursorPositionProvider=this.container.resolve("cursorPositionProvider");return}this.timezone=function(){try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e&&e.length>3)return e}catch(e){}}(),this.resetWidgetId(),eS.setWidgetId(this.widgetId||""),this._visitor=this.container.resolve("visitor"),eS.setVisitorId(this.visitor.uuid);let r=new URLSearchParams(document.location.search);if(r.has("q_trace")){let e=r.get("q_trace");this.traceState.setIsTracing(!0,e)}if(!eh.isInDebugMode()&&this.isDebug&&eh.initializeDebugMode(),this.channel.on("refresh",this.onRefresh),this.channel.on("widgetLongTasks",e=>{this.recordWidgetLongTaskSpans("Widget Long Task",JSON.parse(e))}),this.channel.on("startLightboxLoadingSpinner",()=>{th.finishWaitForLightboxLoadingSpinnerSpan()}),await eL.startActiveSpanAsync("Connect Cable",{},n,async e=>{i=await this.connectChannel(!1),e.end()}),!this.isDisposed&&(2===i&&await eL.startActiveSpanAsync("Delay Init",{},n,async e=>{await this.delayInit(),e.end()}),!this.isDisposed)){if(1!==i&&await eL.startActiveSpanAsync("Connect Cable",{},n,async e=>{i=await this.connectChannel(!1),e.end()}),!this.isDisposed){if(1!==i||!this.config.requiresCookieConsent&&await this.isBlacklisted())return this.abortInit();if(!this.isDisposed){var s,o;this.initSpan=eL.startSpan("Init Widget",{},e3.initSpan),await (s=this.initSpan,o=async()=>{var e,t;let i=eN();this._pageViewActivityEmitter=this.container.resolve("pageViewActivityEmitter"),this._tracker=this.container.resolve("tracker"),this._iframeManager=this.container.resolve("iframeManager"),this.apiHandler.markReady(),this.emitWidgetEvent("apiReady"),this.trackVisitedContentActivity();let n=this.visitor.formExperienceData;if(this.tracker.config.hasSmartForms&&n){let e={formType:n.formType,formId:n.formData.formId,formActionUrl:n.formData.formActionUrl},i=this.tracker.config.formBotTriggers[n.formType];n.formData.formActionUrl&&i&&!i.includes(n.formData.formActionUrl.replace(/^https?:\/\//,""))?this.debugState.logEvent("widget:formExperienceDataFound","error",e,'Form experience data was found from previous page but "formData.formActionUrl" is not in the list of configured triggers'):(this.debugState.logEvent("widget:formExperienceDataFound","success",e),this.tracker.setInitializationParams({smart_form:{form_type:n.formType,field_values:{email:n.formData.formEmail},form_data:{raw:(0,S._)({},n.formData),form_id:n.formData.formId,form_action_url:null==(t=n.formData.formActionUrl)?void 0:t.replace(/^https?:\/\//,""),form_email:n.formData.formEmail}}}),th.startSubmitFormSpan({"form.type":n.formType,"form.with_redirect":!0}),this.iframeManager.showLightboxLoading(),this.visitor.clearFormExperienceData())}eL.startActiveSpanAsync("Init tracker",{},i,async e=>{await this.tracker.init(),e.end()});try{this.debugState.logEvent("widget:initFormExperience","success"),this.initFormExperience()}catch(e){this.debugState.logEvent("widget:initFormExperience","error",{error:e})}this.tracker.config.hasWebsiteEmbeddedForms&&this.initQualifiedForms(),this.exposeDebugging();let r=eL.startSpan("Init Iframe",{},this.initSpan),s=[this.iframeManager.init(),this.initializeAnalytics(),this.initializeMultimodal(),this.initializeMultimodalV2()];await Promise.all(s),r.end(),!this.isDisposed&&(this.channel.startEmitter(),await this.recordPerformanceEntries(r),this.readyState=3,this.emitWidgetEvent("widgetInitialized"),(null==(e=this.config.featureFlags)?void 0:e.widgetUseShadowDynamicImport)&&await this.initializeDummyModule())},eC({telemetryCtx:n?{traceId:n.traceId,parentSpan:s,telemetry:n.telemetry}:void 0},o))}}}}syncInit(e){var t;this.loaded=!0,this.readyState=2;let i=X(window.location.href),n=null==(t=e.experimentSelectors)?void 0:t.filter(e=>{let{url:t}=e;return J(i,X(t),t.endsWith("*"))});n&&n.length>0&&(this.personalizationObserver=new ia(n),this.personalizationObserver.start()),this._channel=this.container.resolve("channel"),this.debugState.channel=this._channel,this.initTelemetry()}debugLog(e,t,i){void 0===t&&(t="info"),void 0===i&&(i={});try{if(this.isDebug){let n=Object.keys(i).length>0?"["+Object.entries(i).map(e=>{let[t,i]=e;return t+"="+i}).join(" ")+"] ":"";switch(t){case"info":console.log(""+n+e);break;case"error":console.error(""+n+e);break;case"warn":console.warn(""+n+e)}}}catch(e){console.error(e)}}serverLog(){for(var e=arguments.length,t=Array(e),i=0;i{let t=()=>{window.removeEventListener("scroll",t),window.removeEventListener("mousemove",t),e(!0)};window.addEventListener("scroll",t),window.addEventListener("mousemove",t)});await (0,Y.cb)(1e4),await e,this.awaitedDelay=!0}async connectChannel(e){try{await this.channel.connect()}catch(t){switch(t){case"clear_cookies":return this.visitor.reset(),this.onRefresh(),0;case"invalid_uuid":return e||this.visitor.reset(),0;case"delay_connect":return 2;default:throw t}}return 1}async initializeAnalytics(){try{if(this.isDisposed)return;this.analytics=await this.loadAnalytics(),this.analytics.init()}catch(i){var e;let t=Error("Failed to initialize analytics with error: "+(i instanceof Error?i.message:String(i)));null==(e=(0,e_.N)())||e.captureException(t)}}async initializeOffers(){try{if(this._offerScript)return;this._offerScript=await this.loadOfferScript()}catch(i){var e;let t=Error("Failed to initialize offers with error: "+(i instanceof Error?i.message:String(i)));null==(e=(0,e_.N)())||e.captureException(t)}}async initializePageMirror(){try{if(this.pageMirror)return;let e=await this.loadPageMirrorFactory();this.pageMirror=e.create()}catch(i){var e;let t=Error("Failed to initialize page mirror with error: "+(i instanceof Error?i.message:String(i)));null==(e=(0,e_.N)())||e.captureException(t)}}async initializeMultimodal(){var e,t,i,n,r,s,o;try{if(this.isDisposed||!((null==(e=this.config.featureFlags)?void 0:e.piperMultimodal)||(null==(t=this.config.featureFlags)?void 0:t.demo))||!(null==(i=this.config.featureFlags)?void 0:i.widgetUseCodeSplitSnippet))return;this.debugState.logEvent("widget:multimodal:gate","success",{piperMultimodal:null==(n=this.config.featureFlags)?void 0:n.piperMultimodal,demo:null==(r=this.config.featureFlags)?void 0:r.demo,widgetUseCodeSplitSnippet:null==(s=this.config.featureFlags)?void 0:s.widgetUseCodeSplitSnippet}),this.debugState.logEvent("widget:multimodal:loadStart","success");let o=await this.loadMultimodal();this.debugState.logEvent("widget:multimodal:loadDone","success"),o.init(),this.debugState.logEvent("widget:multimodal:initCalled","success")}catch(n){let e=n instanceof Error?n.message:String(n),t=n instanceof Error?n.stack:void 0,i=Error("Failed to initialize multimodal with error: "+e);null==(o=(0,e_.N)())||o.captureException(i),this.debugState.logEvent("widget:multimodal:loadError","error",{message:e,stack:t})}}async initializeMultimodalV2(){var e,t,i;try{if(this.isDisposed||!(null==(e=this.config.featureFlags)?void 0:e.widgetAllowMessengerV2Styling)||!(null==(t=this.config.featureFlags)?void 0:t.widgetUseCodeSplitSnippet))return;(await this.loadMultimodalV2()).init()}catch(t){let e=Error("Failed to initialize multimodal v2 with error: "+(t instanceof Error?t.message:String(t)));null==(i=(0,e_.N)())||i.captureException(e)}}async initializeDummyModule(){try{(await this.loadDummyModule()).init()}catch(i){var e;let t=Error("Failed to initialize dummy module with error: "+(i instanceof Error?i.message:String(i)));null==(e=(0,e_.N)())||e.captureException(t)}}async initializeMultiModalV2(){}async loadAnalytics(){return this.container.resolve("analytics")}async loadOfferScript(){return this.container.resolve("offerScript")}async loadPageMirrorFactory(){return this.container.resolve("pageMirrorFactory")}async loadMultimodal(){return this.container.resolve("multimodal")}async loadMultimodalV2(){return this.container.resolve("multimodal_v2")}async loadDummyModule(){return this.container.load("dummyModule")}get isMeetingLink(){return window.location.origin===this.config.meetingLinkHost}get meetingLinkToken(){if(!this.isMeetingLink)return;let e=window.location.pathname.replace(/^\//,"").split("-");return e[e.length-1]}get connectionParams(){var e;let t={wv:this.config.version||"",token:this.config.token||"",vu:this.visitor.uuid,wu:this.widgetId,ca:this.lastClientActivityAt,tz:this.timezone,bis:function(){try{Intl}catch(e){return 0}try{Intl.DateTimeFormat()}catch(e){return 1}try{Intl.DateTimeFormat().resolvedOptions()}catch(e){return 2}try{Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return 3}let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return e&&e.length>3?5:4}(),referrer:document.referrer,pv:+!!(0,F.n)(),fv:this.config.frontendVersion||"",iml:this.isMeetingLink,bl:(null==(e=navigator)?void 0:e.language)||null},i=new URLSearchParams(document.location.search),n=i.get("q_ip");return n&&(t.demo_ip=n),i.get("q_debug_gpt")&&(t.debug_gpt=!0),this.traceState.isTracing&&(t.q_trace=this.traceState.traceValue),this.awaitedDelay&&(t.ad=1),t}exposeDebugging(){Object.assign(window[window.QualifiedObject]||{},{widget:this,visitor:this.visitor,tracker:this.tracker,container:this.container})}abortInit(){this.readyState=4}cleanup(){var e,t,i,n,r,s,o,a,l,c,u,d,h,p,m,f;null==(t=this._iframeManager)||null==(e=t.tryDispose)||e.call(t),null==(n=this._tracker)||null==(i=n.tryDispose)||i.call(n),this.pageMirror&&"tryDispose"in this.pageMirror&&this.pageMirror.tryDispose(),null==this.apiHandler.tryDispose||this.apiHandler.tryDispose.call(this.apiHandler),null==(s=this._channel)||null==(r=s.tryDispose)||r.call(s),null==(a=this.analytics)||null==(o=a.tryDispose)||o.call(a),null==(c=this._visitor)||null==(l=c.tryDispose)||l.call(c),null==(d=this._offerScript)||null==(u=d.tryDispose)||u.call(d),null==(p=this._pageViewActivityEmitter)||null==(h=p.tryDispose)||h.call(p),null==(f=this.cursorPositionProvider)||null==(m=f.tryDispose)||m.call(f),null==this.hubspotFormSubmitListenerDisposer||this.hubspotFormSubmitListenerDisposer.call(this),null==this.marketoFormBeforeUnloadDisposer||this.marketoFormBeforeUnloadDisposer.call(this),null==this.marketoFormPageHideDisposer||this.marketoFormPageHideDisposer.call(this),this.container.tryDispose(),this.loaded=!1}recordInitTelemetry(){var e;null==(e=this.initSpan)||e.end(),e3.endBootstrap()}initTelemetry(){let e;this._channel&&(this.channel.once("initTrackerCreatePageView",()=>e=eL.startSpan("Select Bot",{},this.initSpan)),this.channel.once("initState",()=>{e&&e.end(),this.recordInitTelemetry()}))}initFormExperience(){if(!this.tracker.config.hasSmartForms)return void this.debugState.logEvent("widget:hasSmartForms","error");if(this.debugState.logEvent("widget:hasSmartForms","success"),eh.isInDebugMode())try{var e,t;let i,n,r,s,o;t=e=this.config.host||"",(i=document.createElement("img")).src=""+t+et,Object.assign(i.style,eu),n=document.createElement("div"),Object.assign(n.style,ea),r=document.createElement("img"),Object.assign(r.style,ec),r.src=""+e+ee,r.addEventListener("click",()=>{n.remove(),(0,Z.C6)(en,!1),eh.exitDebugMode()}),s=document.createElement("div"),Object.assign(s.style,el),s.innerText="Submit a form to test your experience",(o=document.createElement("div")).style.display="flex",o.append(i),o.append(s),o.append(r),n.append(o),window.addEventListener("submit",()=>{ed(n,s,r),(0,Z.C6)(en,!0)}),(0,Z.yw)(en)&&ed(n,s,r),document.body.appendChild(n)}catch(e){console.warn("Error showing debug banner!")}let i=this;if(void 0!==window.MktoForms2)this.debugState.logEvent("widget:marketo:MktoForms2Found","success"),this.initMarketoForms();else if(Object.hasOwn(window,"MktoForms2"));else{let e;this.debugState.logEvent("widget:marketo:MktoForms2Found","error"),Object.defineProperty(window,"MktoForms2",{get:()=>e,set(t){e=t,setTimeout(()=>{try{i.initMarketoForms()}catch(e){i.debugState.logEvent("widget:marketo:initMarketoFormsComplete","error",{error:e})}},0)}})}if(void 0!==window.hbspt)this.debugState.logEvent("widget:hubspot:hbsptFound","success"),this.initHubspotForms();else if(Object.hasOwn(window,"hbspt"));else{let e;this.debugState.logEvent("widget:hubspot:hbsptFound","error"),Object.defineProperty(window,"hbspt",{get:()=>e,set(t){e=t,setTimeout(()=>{try{i.initHubspotForms()}catch(e){i.debugState.logEvent("widget:hubspot:initHubspotFormsComplete","error",{error:e})}},0)}})}}initQualifiedForms(){try{!function(e){let{channel:t,iframeManager:i}=e;if(!("customElements"in window))throw Error("This browser does not support custom elements");window.customElements.define(Q,function(e){let{channel:t,iframeManager:i}=e;return class extends W{get template(){let e=document.createElement("template"),t="qualified-form-"+this.instanceId+"-email-input";return e.innerHTML='\n        \n        \n        
\n
\n
\n \n
\n \n
\n \n
\n \n
\n \n
\n
\n \n
\n \n
\n
\n ',e}constructor(...e){super(...e),this.channel=t,this.iframeManager=i,this.qualifiedFormApi=null}}}({channel:t,iframeManager:i}))}({channel:this.channel,iframeManager:this.iframeManager}),this.debugState.logEvent("widget:qualifiedForms:initQualifiedForms","success")}catch(e){this.debugState.logEvent("widget:qualifiedForms:initQualifiedForms","error",{error:e})}}initMarketoForms(){void 0===window.MktoForms2?this.debugState.logEvent("widget:marketo:MktoForms2Found","error",{},'"window.MktoForms" was previously defined, but is no longer present. This website may have executed javascript which is interfering with the Marketo Smart Form initialization process.'):(window.MktoForms2.whenReady(e=>{this.tracker.config.formBotTriggers.marketo.includes(String(e.getId()))&&(this.debugState.logEvent("widget:marketo:configuredFormFound","success",{formId:e.getId()}),e.onSubmit(e=>{this.initMarketoFormsRedirectListeners();let t=e.getValues(),i=t.formid,n=t.Email,r=this.excludeLongFieldValue(e.getValues(),"marketo");this.marketoFormSubmitData=r,this.debugState.logEvent("widget:marketo:onSubmit","success",{formId:i,formEmail:n})}),e.onSuccess((e,t)=>{this.marketoFormSucceededAt=Date.now();let i=e.formid,n=e.Email;this.marketoFormSubmitData&&(this.visitor.setFormExperienceDataWithExpiry({formType:"marketo",formData:(0,S._)({},this.marketoFormSubmitData,{formId:i,formEmail:n})}),this.tracker.pageViewActivityEmitter.emitFormFill({formType:"marketo"})),this.debugState.logEvent("widget:marketo:onSuccess","success",{formId:i}),setTimeout(()=>{this.marketoFormRedirecting||(this.debugState.logEvent("widget:marketo:showExperienceForForm","success",{formId:i}),this.tracker.showExperienceForForm("marketo",{raw:(0,S._)({},e),formId:i,formEmail:n}),this.visitor.clearFormExperienceData(),this.visitor.setLastValidRebroadcastTime(this.dateProvider.new().getTime()+this.marketoLastValidRebroadcastThreshold))},this.marketoRedirectThreshold)}),this.debugState.logEvent("widget:marketo:configuredFormSetup","success",{formId:e.getId()}))}),this.debugState.logEvent("widget:marketo:initMarketoFormsComplete","success"))}initMarketoFormsRedirectListeners(){this.marketoFormBeforeUnloadDisposer||this.marketoFormPageHideDisposer||(this.marketoFormBeforeUnloadDisposer=(0,F.q2)(window,"beforeunload",e=>{this.logMarketoRedirectEvent("Preparing to navigate","desktop",500),this.marketoFormRedirecting=!0}),this.marketoFormPageHideDisposer=(0,F.q2)(window,"pagehide",e=>{this.logMarketoRedirectEvent("Navigated","mobile",1e3),this.marketoFormRedirecting=!0}))}logMarketoRedirectEvent(e,t,i){if(this.marketoFormSucceededAt){let n=Date.now()-this.marketoFormSucceededAt;this.debugState.logEvent("widget:marketo:redirectEvent","success",{redirectEventLabel:e,eventOccurredAt:n},e+" away from page "+n+"ms after Marketo form submission"),n>i&&this.debugState.logEvent("widget:marketo:redirectEvent","error",{eventOccurredAt:n,thresholdForLogging:i,deviceForLogging:t},n+"ms exceeds the default threshold of "+i+"ms we allow for form submission on "+t+". This may prevent the form experience from firing on "+t)}else this.debugState.logEvent("widget:marketo:redirectEvent","error",{},"Attempting to redirect before Marketo form successfully submitted")}initHubspotForms(){if(void 0===window.hbspt)return void this.debugState.logEvent("widget:hubspot:hbsptFound","error",{},"window.hbspt was previously defined, but is no longer present. This website may have executed javascript which is interfering with the HubSpot Smart Form initialization process.");let e=null,t={};this.hubspotFormSubmitListenerDisposer=(0,F.q2)(window,"message",i=>{var n;if(i.origin===window.location.origin&&(null==(n=i.data)?void 0:n.type)==="hsFormCallback"&&this.tracker.config.formBotTriggers.hubspot.includes(i.data.id)){if("onFormSubmit"===i.data.eventName){let n=i.data.data.filter(e=>"email"===e.name);t=i.data.data.reduce((e,t)=>(e[t.name]=t.value,e),{});let r=this.excludeLongFieldValue(t,"hubspot");n&&(e=n[0].value,this.visitor.setFormExperienceDataWithExpiry({formType:"hubspot",formData:(0,S._)({},r,{formId:i.data.id,formEmail:e})}),this.debugState.logEvent("widget:hubspot:onFormSubmit","success",{formId:i.data.id,formEmail:e}),this.tracker.pageViewActivityEmitter.emitFormFill({formType:"hubspot"}))}if("onFormSubmitted"===i.data.eventName){let n=i.data.data.redirectUrl,r=i.data.id;!n&&e&&(this.tracker.showExperienceForForm("hubspot",{raw:(0,S._)({},t),formId:r,formEmail:e}),this.visitor.clearFormExperienceData()),this.debugState.logEvent("widget:hubspot:onFormSubmitted","success",{formId:r,formEmail:e})}}}),this.debugState.logEvent("widget:hubspot:initHubspotFormsComplete","success")}excludeLongFieldValue(e,t,i){try{let a={},l=[],c=0;switch(t){case"hubspot":case"marketo":Object.entries(e).forEach(e=>{let[i,n]=e;!ih.Rr[t].includes(i)&&"string"==typeof n&&(a[i]=n,c+=n.length,n.length>ih.DR&&l.push(i))});break;case"pardot":for(let u=0;i&&uih.DR&&l.push(i)}}}break;default:this.debugLog("[Qualified] FormType is not one of the MAP forms.")}return c>ih.X6&&l.forEach(e=>{delete a[e]}),a}catch(i){return this.debugLog("[Qualified] Failed to exclude inputs with long value. Error: "+i),ih.Rr[t].forEach(t=>{delete e[t]}),e}}recordPerformanceEntries(e){return new Promise(t=>{let i=performance.getEntries().filter(e=>"script"===e.initiatorType&&(e.name.startsWith("https://js.qualified.com/qualified.js")||e.name.startsWith("https://js.qualified-dev.com/qualified.js")));this.recordEntriesAsSpans("Download Snippet",i,null),this.channel.pingPong("requestAssetPerformanceEntries","assetPerformanceEntries",{cdnHost:this.config.cdnHost},i=>{this.recordEntriesAsSpans("Download Messenger Asset",JSON.parse(i),e),t()})})}recordEntriesAsSpans(e,t,i){0!==t.length&&t.forEach(t=>{let n={cached:0===t.transferSize,url:t.name};eL.recordTimedSpan(e,n,i,t.startTime,t.responseEnd)})}recordWidgetLongTaskSpans(e,t){0!==t.length&&t.forEach(t=>{this.channel.perform("record_long_task_spans",{spans:[{name:e,attributes:{name:t.name},duration:t.duration}]})})}open(){this.iframeManager.openMessenger()}endExperience(){this.channel.send({event:"endExperience"})}setCookieConsent(e){this.config.hasCookieConsent=e,this.visitor.updatePersistence(e)}startShipper(){this.iframeManager.startShipper()}stopShipper(){this.iframeManager.stopShipper()}requestKeyframe(){this.iframeManager.requestKeyframe()}registerClientActivity(){window._q_lastClientActivityAt=this.dateProvider.new().toISOString()}resetWidgetId(){this.widgetId=O()()}getSentryClient(){return(0,e_.N)()}get initialized(){return this.iframeManager.widgetHandshake}get cable(){return this.channel.cable}get lastClientActivityAt(){return window._q_lastClientActivityAt}get loaded(){return window._q_widgetInitialized}set loaded(e){window._q_widgetInitialized=e}get widgetInitializedAt(){return window._q_widgetInitializedAt||0}set widgetInitializedAt(e){window._q_widgetInitializedAt=e}set widgetIdForInitOffers(e){window._q_widgetIdForInitOffers=e}get widgetIdForInitOffers(){return window._q_widgetIdForInitOffers}trackVisitedContentActivity(){let e=new URLSearchParams(window.location.search).get("q_ct");e&&this.contentActivityEmitter.emitActivity({type:"visited",trackingUuid:e})}constructor(e,t){if(super(e),this.readyState=1,this.config={},this.isIframed=!1,this.isDebug=!1,this.initSpan=null,this.awaitedDelay=!1,this.isDisposed=!1,this.widget=this,this.marketoRedirectThreshold=(0,C.A)().any?1e3:500,this.marketoLastValidRebroadcastThreshold=5e3,this.marketoFormSucceededAt=null,this.marketoFormRedirecting=!1,this.traceState=new ie,this.debugState=new t9,this.widgetEventsListeners=[],this.marketoFormSubmitData=null,this.logTiming=(e,t,i)=>{try{let n,r=e=>!Number.isNaN(e)&&e>0;if(void 0===i){if(!r(this.widget.widgetInitializedAt))return;n=performance.now()-this.widget.widgetInitializedAt}else{if(!r(i))return;n=i}if(!r(n))return;this.widget.debugLog(e,"info",{durationMs:n}),this.widget.serverLog({message:t,type:"log",extra:{method:"dist",operand:n}})}catch(e){console.warn("Qualified: An unexpected issue occurred in logTiming",e)}},this.addWidgetEventsListener=e=>{try{this.widgetEventsListeners.push(e)}catch(e){console.error("Qualified: Error in Widget#addWidgetEventsListener",e)}},this.emitWidgetEvent=e=>{this.config.clientApiHandleWidgetEventsEnabled&&iV.includes(e)&&this.widgetEventsListeners.forEach(t=>{try{t(e)}catch(e){console.error("Qualified: Error when calling eventListener in Widget#emitWidgetEvent",e)}})},this.onTeardown=()=>(this.dispose(),this.constructor.start()),this.onRefresh=()=>{this.dispose(),setTimeout(()=>{let e=document.querySelector('script[src*="qualified.js"]');if(e){e.parentNode.removeChild(e);let t=document.createElement("script");t.src=e.src+"&"+new Date().getTime(),document.head.appendChild(t)}},Math.floor(3e3*Math.random()))},this.loaded)return void console.warn("Qualified widget already initialized. Aborting.");this.config=k()(t),this.isIframed=(0,i.f8)(),this.apiHandler.init()}}(0,x.Cg)([K.W,(0,x.Sn)("design:type","undefined"==typeof BaseApiHandler?Object:BaseApiHandler)],iW.prototype,"apiHandler",void 0),(0,x.Cg)([K.W,(0,x.Sn)("design:type",void 0===tI?Object:tI)],iW.prototype,"dateProvider",void 0),(0,x.Cg)([e5.Hi,(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",[String,"undefined"==typeof TeamConfig?Object:TeamConfig]),(0,x.Sn)("design:returntype",Promise)],iW.prototype,"init",null),(0,x.Cg)([(0,e5.Hi)(),(0,x.Sn)("design:type",Function),(0,x.Sn)("design:paramtypes",[]),(0,x.Sn)("design:returntype",void 0)],iW.prototype,"trackVisitedContentActivity",null),e3.startSlowTimeout();let iQ=class extends iW{static createContainer(){let e=super.createContainer();return __webpack_require__.p=""+this.environmentConfig.cdnHost+"/packs/",e.register1("analytics",r.default),e.register1("offerScript",n.OfferMainScript),e.register1("pageMirrorFactory",A.default),(0,i.f8)()&&e.register1("apiHandler",E),e}}})(),window.init=__webpack_exports__.default;; var q = init.start({"version":9,"host":"https://app.qualified.com","cdnHost":"https://js.qualified.com","wsHost":"wss://ws7.qualified.com/cable","frontendVersion":"2025-11-03-7420b2f505","meetingLinkHost":"https://schedule.qualified.com"}); q('initialize', "c2orwxnKFzduhuZ8", {"isComplete":true,"cookieExpiration":3650,"domains":["gordian.com","*.gordian.com","gordianstaging.wpengine.com","*.gordianstaging.wpengine.com","mcstaging.rsmeans.com","*.mcstaging.rsmeans.com","rsmeans.com","*.rsmeans.com"],"denylistedVisitorStreamDomains":[],"pardotConfig":null,"hasMarketo":false,"hasHubSpot":false,"hasEloqua":false,"hasMeetingBookerExperienceBuilder":true,"hasSmartForms":true,"hasMessengerSkipLink":false,"disableQOfferInfo":false,"hasOffersFontEnhancements":true,"blacklistPaths":[],"analytics":{"googleAnalytics":{"trackEvents":true,"propertyId":""},"facebook":{"trackEvents":false},"googleTagManager":{"trackEvents":true}},"manualBotTriggers":{},"formBotTriggers":{"marketo":[],"hubspot":[],"pardot":[]},"smartCtaTriggers":{"WEBSITE_CONFIGS":[]},"experimentSelectors":[],"disableLiveView":false,"hasPageViewActivityTracking":true,"hubspotTokenRetrievalTimeout":1000,"hasCLSImprovements":false,"hasWebsiteEmbeddedForms":false,"allowEmbeddedWidgetMode":false,"hasWebsiteCloseChatOnMobileRedirect":false,"hasOffersPopupWithScrollDisabler":false,"hasWidgetFullScreenWithScrollDisabler":false,"hasTallLayoutFixForMobileMessenger":true,"hasSmartCtaShadowDomSupport":false,"hasDismissButtonAccessibilityEnabled":true,"hasOffersFormBannerMobileImprovements":true,"exactMatchCookieDomains":false,"clientApiHandleWidgetEventsEnabled":false,"featureFlags":{"clientAPIHandleWidgetEvents":false,"demo":false,"demoKillSessionShortcut":false,"disableLiveView":false,"eloqua":false,"exactMatchCookieDomains":false,"hubspot":false,"liveViewBlockListSpa":false,"marketo":false,"meetingBookerExperienceBuilder":true,"messengerAccessibleGreetingDismiss":true,"messengerSkipLink":false,"offerAgentChatAutoPounce":true,"offersDisableQOfferInfo":false,"offersFontEnhancements":true,"offersFormBannerMobileImprovements":true,"offersPopupWithScrollDisabler":false,"pageViewActivityTracking":true,"persistPromptDismissal":false,"piperMultimodal":false,"qualifiedGPTContextualPiper":false,"smartCtaEnhancedFreezing":false,"smartCtaNestedTriggersSupport":false,"smartCtaShadowDomSupport":false,"smartForms":true,"video":true,"voice":true,"websiteCloseChatOnMobileRedirect":false,"websiteEmbeddedForms":false,"websiteUseSecureCookies":false,"websiteVisitorStateV2":false,"whitelabeling":true,"widgetAllowEmbeddedMode":false,"widgetAllowMessengerV2Styling":false,"widgetClsImprovements":false,"widgetDebounceIframeResizes":false,"widgetFullScreenWithScrollDisabler":false,"widgetUseCodeSplitSnippet":false,"widgetUseShadowDynamicImport":false},"offersHeaderConfig":{"includedSelectors":null,"excludedSelectors":null,"handleCrossOriginStylesheets":null,"useCssTransitionObserver":null},"qualifiedFormConfigs":{}}); })();